0

We have a server that can be ping-ed but failed to SSH.

Here's the verbose of ssh

[user@/etc]$ssh -v user@111.111.111.111
OpenSSH_5.3p1, OpenSSL 1.0.1e-fips 11 Feb 2013
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to 111.111.111.111 [111.111.111.111] port 22.
debug1: Connection established.
debug1: identity file /hey/hey2/.ssh/identity type -1
debug1: identity file /hey/hey2/.ssh/identity-cert type -1
debug1: identity file /hey/hey2/.ssh/id_rsa type -1
debug1: identity file /hey/hey2/.ssh/id_rsa-cert type -1
debug1: identity file /hey/hey2/.ssh/id_dsa type -1
debug1: identity file /hey/hey2/.ssh/id_dsa-cert type -1

Per the above output, it seems like it hangs so I just have to ctrl + c just to close the ssh command.

There is no failure of SSH, its just like hangs.

We suspect that the server hangs.

NOTE: Changed the IP for security purposes.

3

If you remote server has a DNS Server configured (check in /etc/resolv.conf) the SSH Server will try to do a reverse DNS lookup of the client's IP address. If it's not resolvable, it will wait for a 30s timeout to give you access. So it may be not hanging.

Also check if you can ssh from within the server (through the 127.0.0.1 local IP) to check if it properly working. an sshd -t may also help troubelshoot any syntax check on the /etc/sshd/sshd_config.

| improve this answer | |
  • 2
    OpenSSH stopped performing reverse DNS lookups by default as of release 6.8 (march 2015). The functionality can still be enabled with UseDNS yes in sshd_config, if the server admin so desires. – user4556274 Jun 19 '19 at 12:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.