Some servers I was using today had very slow SSH logins. The user­name prompt came up imme­di­ately but there was about 30 sec­onds of delay before it showed pass­word prompt.

Solu­tion was to edit the file /etc/ssh/sshd_config to turn off DNS check:

sudo vi /etc/ssh/sshd_config

Add line at end:
UseDNS no

Then restart SSH dae­mon:
sudo /etc/init.d/ssh restart

Dis­cus­sion thread I pulled this from here: Slow SSH login — Ubuntu