LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   ssh connection reset by peer (http://www.linuxquestions.org/questions/linux-general-1/ssh-connection-reset-by-peer-63234/)

bubsgt95 06-02-2003 01:34 PM

ssh connection reset by peer
 
after a period of idle time i am being disconnected from my box with the following message.

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


Does anyone have any insight as to what would cause this? i am almost POSITIVE it is not the KeepAlive setting.. the system default is yes.. and i have not changed it otherwise.

thanks

rch 06-05-2003 10:16 PM

Re: ssh connection reset by peer
 
Quote:

Originally posted by bubsgt95
after a period of idle time i am being disconnected from my box with the following message.

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


Does anyone have any insight as to what would cause this? i am almost POSITIVE it is not the KeepAlive setting.. the system default is yes.. and i have not changed it otherwise.

thanks

Many ssh server have a timeout clause which closes the connection after certain idle period.Can you tell me you are connecting to your box through what?(OS? etc)

squirt 06-24-2003 07:58 PM

Well the original poster didn't reply, but seeing as how I have the exact same problem, I'll reply with my information.

SSH Version: OpenSSH_3.6.1p1, SSH protocols 1.5/2.0, OpenSSL 0x0090702f

(Also OpenSSH 3.5pl, I upgraded in hopes that it would fix the problem)

This is on Slackware 9.0, Some notes tho... SecureCRT doesn't disconnect me when I'm in Windows, although it used to until I set the keepalive setting in SecureCRT. Thinking that the keepalive may not be set to yes as it says it is by default in the manpage, I edited my ~/.ssh/config and for Host * I added KeepAlive yes, but that didn't work as that bastard peer still keeps resetting my connection. ;P

One more note, this isn't just with ssh as I found out, but with normal 'telnet' as well. Any insight given would be greatly appreciated.

rch 06-27-2003 10:17 AM

First sorry for replying late.
Is there a timeout line in your config file,increase the timeout as you see fit.
You may also do the following
echo -e "300\c" > /proc/sys/net/ipv4/tcp_keepalive_time
or
(if you are using ipchains)
ipchains -M -S 144000 60 3600
Finally are you using ip masquerading ?

rch 06-27-2003 10:18 AM

And I think I should ask you how come that you have only one post even though you have registered in october 2002?

squirt 06-27-2003 11:36 AM

Quote:

First sorry for replying late.
Any reply is a good reply.

Quote:

Is there a timeout line in your config file,increase the timeout as you see fit.
No.. there is no timeout line in either my ssh config file nor the sshd_config on the server, didn't set it on my side because I didn't see that option in the man page.

Quote:

You may also do the following
echo -e "300\c" > /proc/sys/net/ipv4/tcp_keepalive_time
Trying that right now... just giving it a little while of some idle time to see if it will work... (It was at 7200 prior) Well after about a half hour of letting it idle it appears to have worked... It'll get the acid test when I goto work tonight and leave it idleing :p But thanks for the info, I'll make sure I add that into my rc.local.

Quote:

Finally are you using ip masquerading ?
No... but now that I think about it, these problems both with windows and now linux only first started appearing after I got my DSL router, never thought of that until now

Quote:

And I think I should ask you how come that you have only one post even though you have registered in october 2002?
Good question... I think when I first registered I was having a problem with a irc bot that I was programming and was going to ask about it, but then I just lapsed and left the bot half finished, which is kind of funny seeing as now I have two half-finished irc bots sitting on my computer... Then a game I was waiting for came out so I spent a while in windows playing that, and just now kicked myself in the ass to get back to using linux.

DavidPhillips 06-27-2003 10:24 PM

This can be caused by the connection.

I would put something like this in your rc.local file

ping -i 60 68.63.64.1 > /dev/null 2>&1 &

you may want to use an ip address a couple of hops away. this will keep your connection from going idle.

you can use traceroute on a few major sites and use a router that's common to all major sites a couple of hops away.

If you still have a problem then send the output of ping every couple of seconds to a file and see if your connections doing something when it gets logged off.


somewhere along the way from one machine to the other you should find the problem.


All times are GMT -5. The time now is 01:27 AM.