If you find that SSH is slow to login it’s likely because due to DNS resolution. When logging in via SSH the terminal will immediately prompt for the username / login (login as:) but after typing the username the terminal will hang for a short while before asking for the password. This is because after the username has been sent the server will perform a DNS lookup and this is likely failing. Check your /etc/resolv.conf and change your distro’s DNS resolver.
I’ve often seen this when a machine has been configured in one location with a DHCP internal DNS resolver then moved to another network.
Hope this helps!
Jay Greig
echo “UseDNS no” >> /etc/ssh/sshd_config
/etc/init.d/ssh restart