SSH hangs on remote connections

Hello,
I’ve had this problem for a few weeks now. I can connect via SSH over my LAN which uses just a password, and it works fine. When I try to SSH to my Digital Ocean droplet, the SSH command just hangs. I can connect to the droplet via the portal interface on their website, and all the services are up on its end. I’ve tried creating a new droplet and I cannot connect from my laptop, but can still get to it from their interface. I’m using Yaquake if that matters.

ssh -vvv user@ip.add.ress shows the server accepting the public key, but then stops at debug3: sign_and_send_pubkey: signing using rsa-sha2-512 SHA256 and never prompts for the passphtase. I am using key-based authentication and not logging in as root (as that’s disabled). Any thoughts?

Without further information, such as the full debug log, I would assume that it is sshd on the server that is blocking the client. After the mentioned line, the client usually sends a packet of type 50. If this does not happen, the server is incorrectly configured.

2 Likes

What can I check on server? This is a connection that’s worked for 2+ years that suddenly stopped.

The config of the sshd server sshd_config? Probably the path to authorized_keys is wrong or alternated… However, if the password authentication works, then it is strictly the config of public key authentication.

Thanks!

  • Key from Digital Ocean exactly matches my id_rsa.pub
  • Firewall is allowing port 22
  • Restarted VM and thus SSH, same problem occurs
  • Trying with Konsole hangs at the same portion

Checking /var/log/auth.log on the server shows this line whenever I disconnect from the hung SSH connection in my terminal window - it does not show any sort of connection information.
Connection closed by authenticating user user@ip.add.ress port xxxxx [preauth] where the xxxxx is a port number that varies.