I am trying to SSH into a server and it hangs at login

Solution 1:

Take a look at this blog post: “Troubleshooting sshd server configuration.”

Especially the part,

  1. run /usr/sbin/sshd -d -D -p 222 on the server.
  2. run ssh -v -C -A -X -p 222 on the client.

Normally the log on the server side will reveal what went wrong.