(dv):SSH connection troubleshooting
- This page was last modified on December 15, 2010, at 18:31.
From (mt) Community Wiki
Contents |
Troubleshooting SSH Connection Issues
Sometimes when connecting over SSH, the prompt doesn't appear right away.
SSH by default tries to look up the remote hostname to see if that hostname maps back to the same IP address. Please check if your reverse DNS is properly set.
For example: We've noticed the same issue while connecting to some servers because the reverse DNS IP we're connecting from is set to "reserved" which is not a correct DNS name
To disable this check and reduce the timeout:
Enable "UseDNS no" in /etc/ssh/sshd_config and restart the SSH service: "/etc/init.d/sshd restart || /etc/init.d/ssh restart"
Same thing as a one-liner:
sed -i 's/.*UseDNS.*/UseDNS no/g' /etc/ssh/sshd_config ; /etc/init.d/sshd restart || /etc/init.d/ssh restart
Here's the OpenSSH FAQ talking about the same issue: http://www.openssh.org/faq.html#3.3
Alternatively, make sure that you reverse DNS entry is set to a valid name. This can be set from the AccountCenter.