Page cover
githubEdit

Connection reset by peer

SSH Problem

How can I fix "kex_exchange_identification: read: Connection reset by peer"?

The error is:

kex_exchange_identification: read: Connection reset by peer
Connection reset by x.x.x.x port 22
Connection closed by x.x.x.x port 34976

It could be the process on the server side listening to the SSH port is dead, and even a restart / stop service do not work. So to find the process, and killing it may solve the problem.

Let's debug more with netstat:

Time to kill pid:

Now, the issue is fixed:

Last updated