If it's a DNS resolving issue, it's easy to check:
on the server, after login via ssh (the one that takes ages), run
getent hosts ${SSH_CLIENT%% *}
if that takes ages, then that's the issue. If not, try a getent hosts on the hostname
returned by the command above.
If it is due to DNS resolving issue, best would be to resolve your DNS issues. If that's not
possible you can put "UseDNS no" in your sshd_config.
Is the server running ubuntu? Then it could also be due to the pam_motd PAM module that on
some ubuntu version dynamically generates a /etc/motd file upon login, and that can take a
very long time.
It would be helpful to see the output of ssh -v hostname and see where it hangs.
You may also want to change the sshd LogLevel to "debug" to get more information. Check your
syslog configuration to see where sshd messages end up. The could be found in
/var/log/syslog, /var/log/auth.log, /var/log/messages, /var/log/secure, even
/var/adm/messages depending on the system.
|