There are two things that generally will slow your login via SSH or SFTP. The first is that by default SSHD will attempt to do a reverse DNS lookup on your IP address to log a DNS name instead of just the IP. If you do not have a reverse DNS, this can cause delays. The second is GSSAPI Authentication which is used with Kerberos. Having the server wait for a Kerberos token timeout just increases delay. If you don’t use Kerberos, disable it.
To disable these settings, modify /etc/ssh/sshd_config:
#GSSAPIAuthentication yes GSSAPIAuthentication no #UseDNS yes UseDNS no
You then need to reload the SSHD daemon. Any established connections will not be affected.
service sshd reload
Note: Before you log off of your SSH session, open a second session to verify SSH is still functional. If it is not, you will still be able to troubleshoot the problem with your existing SSH session.
We hope you find this article helpful. Please share it with your friends, colleagues, and on all your favorite social sites. Let us know what interests you, and we will write it. Don’t forget to leave a comment.