SSH: Connection Reset by Peer
Solution 1:
Check your .ssh/authorized_keys file on the server if you are using key based authentication. I had the same issue, and the person who had set up access had pasted the key with line breaks in. Removing the line breaks fixed the issue, although you can test by moving the authorized_keys file out of the way, or by picking password authentication first and seeing if you get the same issue:
ssh -o PreferredAuthentications=password username@hostname
Solution 2:
Try to completely disable GSSAPI:
GSSAPIAuthentication no
Are you in allowed user list in sshd_conf?
Solution 3:
You might be able to get some more useful debugging information by executing
sshd
with the -d
flag (and possibly the -p
flag to specify another port
if you want to leave the original sshd
running), and then connecting to it
with your ssh -v
client.
Update: It looks like your issue is network related rather than authentication related. You can see that both sides of the conversation had their connection reset. You might check with the relevant network team to see if there is an intermediate network node (e.g. a firewall) that is causing the problem.
Solution 4:
This is interesting, I have the same issue. Only I can ssh from the local network but not when using vpn.
May 11 18:03:10 servername sshd[14733]: [ID 800047 auth.crit] fatal: Read from socket failed: Connection reset by peer
I never get prompted for a pw. The sessions dies to quickly.