Slow initial SSH connection and other weird behavior

Yes, it happened to us. Even if the network connection was fast, the initial connection was too slow. The culprit turned out to be a faulty DNS server of our provider—probably SSH does a rev DNS lookup on connecting or something like this.

After running our server as a recursive DNS server and changing the entries in resonv.conf to localhost, the problem disappeared.

One Response to “Slow initial SSH connection and other weird behavior”

  1. Jared Says:

    Thanks a bundle! ;) I have a dev server on our local network, and the HDD filled & the database stopped working (as it does). So cleared up some space & moved some things to separate filesystems, rebooted, and it worked … but every time I loaded a page on my machine (scripts use database on the dev server), it would hang for 1 minute, then display. And the initial SSH connection also hung for a while, but then all was fine. I thought it had something to do with the database like maybe it hadn’t started up properly, but a quick google brought me here & you saved me from going on a wild goose chase. All the best.

Leave a Reply