Physical Address

304 North Cardinal St.
Dorchester Center, MA 02124

SSH connection takes too long to respond/connect

Has an SSH connection taken too long to return the password prompt? There are two possible fixes to it.

There are two possible ways to fix this,

First, disable Reverse DNS lookups on SSH connections on the target machine. Edit the  sshd_config file located at /etc/ssh and add the following line to the top:

UseDNS no

Restart the sshd server

service sshd restart

If this doesn’t fix things then try the following line in the same file. Make sure you are GSSAPI Authentication otherwise the SSH server will break.

GSSAPIAuthentication no

Restart the sshd server

service sshd restart