Comment 2 for bug 883201

Revision history for this message
Joel Eidsath (jeidsath) wrote :

I've tracked the problem down to something DNS related. But I'm still not sure exactly what the issue is.

Other people seem to be having the problem as well, for a couple of Ubuntu releases at least. The instructions for fixing the problem on the internet say to set "UseDNS = no" in client sshd config (this is silly and does nothing of course), and then to add the server hostname in /etc/hosts (which is actually what fixes the problem).

Troubleshooting reveals the following interesting facts:

1) The problem does not occur with IP addresses or FQDNs. So 'ssh servername.domain.com' or 'ssh 192.168.0.2' is fast but 'ssh servername' is slow.

2) 'host servername' is consistently fast, and the only search line in /etc/resolv.conf is 'search domain.com'

3) The root user does not experience this issue.

4) Normal users with all userland config wiped (.bashrc and .bash_profile) still experience the issue.

5) The problem is not reproducible with any other network tool other than ssh. Ping, telnet, wget, etc., do not experience any DNS-lookup hang.

So what is ssh doing special with regards to DNS that other network tools don't do?