How to fix SSH error "Write failed: Connection reset by peer" on server side?
This turns out to be a client issue, not a server-side one.
I switched to specialized SSH clients such as the BitVise SSH client, and never had this issue again.
Related videos on Youtube
tinlyx
Updated on September 18, 2022Comments
-
tinlyx over 1 year
I was running a long SSH process remotely on an Ubuntu machine (16.04) for a few hours, and eventually I got:
Write failed: Connection reset by peer
I was wondering what the cause is. Is it a time out error because it's taking too long? As the error suggests, it seems that the problem lies with the server and the server is initiating this.
My question is that is there something I can do on
openssh-server
to fix this problem, e.g. by increasing certain time limits?By the way, I am using the ssh client coming from MinGW/MSYS. I am now trying repeating the process using a different SSH client to see if this is a random issue with the network or is it a server configuration problem.
-
Archemar about 8 years1) try to change TCPKeepAlive 2) if server host is "far" (not in same LAN), from client host, try pinging the other to maintain connection pen.
-
danielson317 about 7 yearsPossible solution: unix.stackexchange.com/questions/157556/… This is the most useful I found.
-
danielson317 about 7 yearsPossible duplicate question: superuser.com/questions/886822/…
-