When ssh login to linux host when internet is not there, you have to wait for few seconds before password prompt come out. This is because the ssh server is reverse checking the IP and the Reverse DNS of person who login. This is sometime annoying and can be disable –

Set “UseDNS no” in /etc/ssh/sshd_config file . That’s it.

In order to remove dns lookups completely, you have to use -u0 options when starting sshd server.
It can easily add this options to /etc/default/ssh or /etc/sysconfig/sshd or elsewhere starting the ssh server.

-u0 option’s means that it will not put hostnames into the utmp structure (i.e. what you see when you type “who” at the shell prompt), which means that sshd will not perform DNS lookups for that purpose. However there are still cases where a lookup has to be performed when a user has
“from=
like entries in his authorized_keys file, or when authentication methods or configuration directives are used that involve hostnames.