-   Linux - Networking (
-   -   Connection reset by peer (

manojg 06-21-2005 10:01 AM

Connection reset by peer

I had connected to a remote computer through SSH. After few hours I got following massage:

Read from remote host Connection reset by peer. Connection to closed.

Could you tell me what the problem is and how to fix this.

Thank you very much.


Texicle 06-22-2005 09:59 AM

You lost a connection to it. There's too many variables to say what exactly it was. Your modem could've dropped offline for a minute, the remote computer might have been rebooted, or decided that you filled your quota of time and kicked you, your ISP might have had some problems, etc.

mike-g2 07-09-2005 08:49 AM

I'm running into the same problem when I log in from home. Here's some extra information: the remote host is my linux machine running FC3 with firestarter.

Is there a way to find out if it's my linux server activating this and if so where's the setting that's causing it?



Aestus 12-01-2005 08:00 AM

Same problem, Win2K -> Slackware
I'm having the same problem. I can SSH to my home machine, but after some point (usually between 5 and 30 minutes later, I would guess) I get a "connection reset by peer" error. Here's the tail end of ssh -vv 2>/tmp/ssh.log:

debug2: channel 0: window 32765 sent adjust 32771
debug2: channel 0: window 32743 sent adjust 32793
debug1: channel 0: free: client-session, nchannels 1
debug3: channel 0: status: The following connections are open:
  #0 client-session (t4 r0 i0/0 o0/0 fd 4/5 cfd -1)

debug3: channel 0: close_fds r 4 w 5 e 6 c -1
debug3: fd 2 is not O_NONBLOCK
Read from remote host Connection reset by peer
Connection to closed.
debug1: Transferred: stdin 0, stdout 0, stderr 108 bytes in 6078.6 seconds
debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 0.0
debug1: Exit status -1
debug1: compress outgoing: raw data 26857, compressed 12497, factor 0.47
debug1: compress incoming: raw data 168482, compressed 39876, factor 0.24

I'm not sure if this can be traced, but I'd like to figure out where the weak link is. Generally, I SSH home and connect to other machines inside screen(1). The top-level SSH connection fails, I reconnect, I attach to the same screen, and all my old SSH connections are still active. So, it appears to be something on the local network, be it my workstation, the router, or the connection to our service provider.

I'm connecting from Win2K SP4, either with OpenSSH inside xterm via Cygwin, or PuTTY. Remote machine is Slackware 10.0. Any ideas or suggestions would be appreciated. =)

nx5000 12-01-2005 08:04 AM

Try this. its based on asumptions.. I can not try it but would be interested if it corrects the problem.

" in your firewall configuration, increase the timeout for ssh connection to a value higher than /proc/sys/net/ipv4/tcp_keepalive_time" would be the cleanest

Aestus 12-01-2005 08:30 AM

I don't believe it's a timeout issue in my case. Oftentimes I'll lose the connection while I am typing. Vim will become unresponsive, and after 15-20 seconds I'll get the "connection reset" message.

micster 11-29-2008 12:43 AM

Sorry to be bringing up old post, but I have this problem too.

I came across an interesting thread here: where "not_an_expert" brings up the idea that it could be Linux IP stack and something about TCP overflow.

I noticed that it happens to more than my ssh sessions, my SAMBA and FTP are effected also. Wish I knew how to fix this.

All times are GMT -5. The time now is 03:21 PM.