From:http://www.tuicool.com/articles/jbarr3
Usually when we connect the OpenSSH server, if the USEDNS option is open, the server will be based on the client's IP address DNS PTR reverse query out the host name of the client, and then based on the queried client hostname DNS forward a record query, and verify whether the original IP addresses are consistent, and this measure prevents client spoofing. Usually we are dynamic IP does not have PTR records, so opening this option does not have much effect. We can improve the speed of connecting to the OpenSSH server by turning off this feature.
The service-side steps are as follows:
Editing a configuration file/etc/ssh/sshd_config
Vim/etc/ssh/sshd_config
Find the Usedns option, if there is no comment, comment it
#UseDNS Yes
Add to
Usedns No
Find the Gssapiauthentication option, if there is no comment, comment it
#GSSAPIAuthentication Yes
Add to
Gssapiauthentication No
Save configuration file
Restarting the OPENSSH server
/etc/init.d/sshd restart
Speed up SSH logins by turning off the Usedns and gssapiauthentication options