Linux Junkie

Just Another Addict

Slow SSH and PING Related to Reverse DNS

| Comments

info: : slow ssh authentication, pings slow/timeout when using fqdn

issue: SSH just sits here for a while when trying to connect.

1
2
3
strace ssh myhostname ...
write(5, "RESOLVE-ADDRESS 192.168.1.1n", 27) = 27
...

Reason: mdns listed in nsswitch.conf doesn’t allow reverse dns to return failure immeditately when DNS lookup return NXDOMAIN.

Resolution: modify /etc/nsswitch.conf

1
2
- hosts:          files mdns4_minimal [NOTFOUND=return] dns mdns4
  hosts: files mdns4_minimal [NOTFOUND=return] dns [NOTFOUND=return] mdns4

Comments