SSH connection is very slow, the operation after the discovery is normal, but also slow connection. Copyright Notice reproduced please leave the source of the person's address
For example, action:
Ping is very good speed, people mistakenly think that SSH connection is not on, after practice is connected, is a slow.
Analysis results, the main reason is: DNS resolution IP caused, can be used in the following several analytical processing methods
Linux under SSH remote Connection service Slow solution ======= try the perfect solution for yourself: 1, change the/etc/ssh/sshd_config on the SSH server
The configuration in the file is as follows: Usedns no# GSSAPI optionsgssapiauthentication No
2, perform/etc/init.d/sshd Restart restart sshd process so that the above configuration takes effect, the connection is generally not slow.
3, if it is still slow, check the SSH server/etc/hosts file, 127.0.0.1 the corresponding hostname and uname-n results, or the native IP and hostname (uname-n result) into the/etc/hosts.
4, use ssh-v dest_ip to see where is slow, the result is the problem 5,google after someone proposed to change the $HOME/.SSH directory permissions to 700, the file permissions in the directory is also modified to only I can access, but the problem still exists.
5, in accordance with the 5 Chinese law to amend the problem resolved.
In addition, The server can not connect the external network, the/etc/resolv.conf in the nameserver all commented out, the problem can be resolved.
6, using Strace to see, SSH after the verification of key, the authentication gssapi-with-mic, at this time to connect to the DNS server, after this will do other operations.
--------------------------------------------------------------------
Based on the above questions, it is found that
Comment out all lines of IP that are not used in/etc/resolv.conf on the server
The problem
Because this configuration file is set when Linux is installed at the beginning.
This article is from the "I am a Little bird" blog, please make sure to keep this source http://liyanchao.blog.51cto.com/9954601/1659726
VMware addresses slow speed connections by addressing SSH SECURECRT via address