Ubuntu slow SSH logon

This is more of an annoyance, but here is a quick and easy fix for a slow ssh logon. The problem is basically when you log in via SSH the password prompt doesn't show up for 10-15 seconds.
sudo nano /etc/nsswitch.conf

Now change the line "hosts: files mdns4_minimal [NOTFOUND=return] dns mdns 4 mdns" to "hosts: files dns"
Log out of your ssh session, and log back in. The password prompt should instantly come up now.