Sometimes you may find yourself waiting quite a while (around 10 seconds or so) when trying to SSH into remote machines, despite being on a fast network connection.
The cause of this is almost always reverse DNS lookups (hostname checks). By default SSH looks up the hostname of the connecting machine, if the connecting machine doesn't have a hostname (or PTR record) configured then there will be a large delay while this query takes place.
To fix this problem, you simply need to tell SSH not to bother doing hostname lookups (they aren't particularly useful anyway and you can always look them up later from the IP if you really need it). You disable the hostname lookups by adding the following to your sshd_config file:
The sshd_config file is most commonly found in /etc/ssh/ but this may vary depending on your distribution of Linux or BSD.