When using SSH, there are times when connecting to a server is very slow, usually displays the information, and then the card is not moving.
Connecting to 10.10.10.10:22...connection established. To escape to local shell, press ' ctrl+alt+] '.
After a long time, information similar to the following will be displayed
Last Login:mon June 3 13:19:59 from 10.10.10.1
This problem occurs because the SSH default has a configuration item Usedns (The document explains this configuration entry means:usedns Specifies whether sshd should look up the remote host name and C Heck that the resolved host name is the remote IP address maps back to the very same IP address. The default is "Yes". )
When this configuration is not turned on the default value is Usedns Yes, which will cause SSH to be connected to the time of the DNS resolution, so there will be a long pause, so to resolve this issue can be opened this configuration item, and then the value to no, the operation is as follows:
Vim/etc/ssh/sshd_config
Remove the comment from line 5th and change the value to No
#Compression delayed#clientaliveinterval 0#clientalivecountmax 3#showpatchlevel nousedns no#pidfile/var/run/ Sshd.pid#maxstartups 10#permittunnel no#chrootdirectory None
Then restart the sshd service.
This article is from "Little public who" blog, please make sure to keep this source http://xiaogongju.blog.51cto.com/12830710/1982062
Linux system is slow to connect