Ubuntu 16.04 慢速 ssh 字符反馈

Ubuntu 16.04 慢速 ssh 字符反馈

我发现远程 ssh 终端对新安装的 Ubuntu 16.04 的反馈非常慢。例如,输入一个字符后,可能需要 20-30 秒才能显示在终端上。首次使用密码登录服务器很快,只是后续的键盘输入很慢。其他应用程序(mysql、nginx)表现出良好的性能,所以这似乎只影响 ssh。

服务器位于本地网络上,客户端->服务器和服务器->客户端的 ping 延迟根据流量在 1ms 到 300ms 之间变化,因此网络延迟不是造成延迟的原因。Traceroute 没有显示任何问题。

服务器并不繁忙,并且本地会话性能良好,因此服务器资源不是造成延迟的原因。

我尝试在客户端和服务器上的 hosts 文件中添加条目。我尝试将客户端从 DHCP 切换到静态 IP/网关/DNS。我尝试使用ssh -v(以下)和ssh -C

我正在寻找有关如何调试此问题并使 ssh 终端性能恢复到可用水平的建议。欢迎提出任何建议。

Roberts-MacBook-Pro:~ regeier$ ping 192.168.1.111
PING 192.168.1.111 (192.168.1.111): 56 data bytes
64 bytes from 192.168.1.111: icmp_seq=0 ttl=64 time=2.565 ms
64 bytes from 192.168.1.111: icmp_seq=1 ttl=64 time=2.184 ms
64 bytes from 192.168.1.111: icmp_seq=2 ttl=64 time=2.259 ms
^C
--- 192.168.1.111 ping statistics ---
3 packets transmitted, 3 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 2.184/2.336/2.565/0.165 ms
Roberts-MacBook-Pro:~ regeier$ ssh -v [email protected]
OpenSSH_6.9p1, LibreSSL 2.1.8
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug1: /etc/ssh/ssh_config line 56: Applying options for *
debug1: Connecting to 192.168.1.111 [192.168.1.111] port 22.
debug1: Connection established.
debug1: identity file /Users/regeier/.ssh/id_rsa type 1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/regeier/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/regeier/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/regeier/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/regeier/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/regeier/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/regeier/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/regeier/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.9
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.2p2 Ubuntu-4ubuntu2.1
debug1: match: OpenSSH_7.2p2 Ubuntu-4ubuntu2.1 pat OpenSSH* compat 0x04000000
debug1: Authenticating to 192.168.1.111:22 as 'ubuntu'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client [email protected] <implicit> none
debug1: kex: client->server [email protected] <implicit> none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:2v5V8cSY2r2DLlfxdNJ6M1zw0yk467wLQiUof0/t1so
debug1: Host '192.168.1.111' is known and matches the ECDSA host key.
debug1: Found key in /Users/regeier/.ssh/known_hosts:4
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /Users/regeier/.ssh/id_rsa
debug1: Authentications that can continue: publickey,password
debug1: Trying private key: /Users/regeier/.ssh/id_dsa
debug1: Trying private key: /Users/regeier/.ssh/id_ecdsa
debug1: Trying private key: /Users/regeier/.ssh/id_ed25519
debug1: Next authentication method: password
[email protected]'s password: 
debug1: Authentication succeeded (password).
Authenticated to 192.168.1.111 ([192.168.1.111]:22).
debug1: channel 0: new [client-session]
debug1: Requesting [email protected]
debug1: Entering interactive session.
debug1: client_input_global_request: rtype [email protected] want_reply 0
debug1: Sending environment.
debug1: Sending env LANG = en_AU.UTF-8
Welcome to Ubuntu 16.04.1 LTS (GNU/Linux 4.4.0-31-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

0 packages can be updated.
0 updates are security updates.


Last login: Fri Jan 27 20:47:02 2017 from 192.168.1.3

相关内容