I just grew fed up with all of my ssh connections taking more than 15 seconds before a connection was established. I ruled out the usual suspects:
- Misconfigured DNS can cause it as a reverse lookup times out. This however was not the case. dig -x [ipaddress] worked fine on the server.
- When ipv6 on the workstation is misconfigured it can cause the problem because ssh will try to connect over ipv6 before connecting thru ipv4. I disabled ipv6 (alias net-pf-10 off in /etc/modprobe.d/aliases) but still no go. I could have guessed since my ipv6 route table was empty..
I fired up wireshark and traced a connection. The cause of the problem was mdns which did lookups that timed out. $DEITY knows why it does; I just disabled it by removing all references to mdns in /etc/nsswitch.conf - and all works fast again
Wireshark is great.