ssh hanging then time out

Troubleshooting tips:

  • Can you ssh localhost on the server?
  • Are users allowed? (AllowUsers setting)
  • Do you bind to the external NIC? (look for ListenAddress 0.0.0.0 or ListenAddress ::)
  • Are you running on port 22? (Port)

    • Basically check /etc/ssh/sshd_config.
  • Added: you can use netstat -tlpn | grep 22 to find out what programs (if any) are listening on port 22 (run as root to see the process names) .

Also, consider using an explicit port connect instead of ping (e.g. nmap -PN remote -p22 or even just telnet remote 22)

Tags:

Ssh

Networking