I was annoyed by the delay that takes place after you enter your username and password on SSH session before command prompt is displayed. It takes about 5-7 seconds. I searched around and it was based on DNS and reverse lookup of local addresses. It feels like a bug in Ubuntu, though. However, the actual problem is in /etc/nsswitch.conf and the line below:
hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4
First time I tried to leave only ‘files dns’ parameters but this caused another issue – I couldn’t ping a single domain from the command line. So I tested several ways to do this and the best solution is to remove only ‘mdns4′ from the above line. Line should look like this:
hosts: files mdns4_minimal [NOTFOUND=return] dns
This way you will have local and reverse dns working, you will be able to ping domain hosted on the server and outside of it and most importantly you will not wait after login to see the shell. This issue is currently in the bug list for Ubuntu and it’s still not fixed in current releases. It exists for several years now. My Ubuntu version is Karmic.




