Problem Description: recently connected to the server is particularly slow (first through the SECURECRT tool connection is slow, and then on other Linux SSH command connection is also the same, from these two points can be excluded from the connection tool problem, the remaining is the SSHD service, but only slow connection, From this point of the problem should be in the establishment of the connection, so the online search for information, users encounter problems and solutions are similar, so the process of a little record .
We generally deal with the idea:
1, to establish a connection to print the entire connection process, find time-consuming Project 2, verify whether the item is a connection must be established, if not close 3, turn off the DNS reverse resolution enabled in SSHD 4, after restarting the service to verify whether it has been resolved
Processing process:
1. Print the connection process information via SSH's-v parameter
# ssh-v [email protected]
650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M00/83/DC/wKioL1d-LtqQU3BDAAHs-UVKxrI794.png-wh_500x0-wm_3 -wmp_4-s_2644835010.png "title=" 11.png "alt=" Wkiol1d-ltqqu3bdaahs-uvkxri794.png-wh_50 "/>
The red part of the figure is a long pause in the connection process.
2. Close GSSAPI authentication and DNS resolution
Sed-i ' s/^gssapiauthentication\syes$/gssapiauthentication no/;s/^ #UseDNS \syes$/usedns no/'/etc/ssh/sshd_config
3. Restart the SSHD service and verify
/etc/init.d/sshd restart
4, if the Linux side with SSH connection is relatively slow, you need to modify the/etc/ssh/ssh_config file on the connection side.
Gssapiauthentication Yes #将GSSAPIAuthentication关键字后的yes改为no
This article is from "a bit of those years" blog, please be sure to keep this source http://wangzz.blog.51cto.com/10856583/1812419
SSH connection Slow processing mode