LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 06-02-2003, 01:34 PM   #1
bubsgt95
LQ Newbie
 
Registered: Oct 2002
Posts: 10

Rep: Reputation: 0
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
 
Old 06-05-2003, 10:16 PM   #2
rch
Member
 
Registered: Feb 2003
Location: Santa Clara,CA
Distribution: Mandriva
Posts: 909

Rep: Reputation: 48
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)
 
Old 06-24-2003, 07:58 PM   #3
squirt
LQ Newbie
 
Registered: Oct 2002
Location: Canada
Distribution: Slackware
Posts: 2

Rep: Reputation: 0
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.
 
Old 06-27-2003, 10:17 AM   #4
rch
Member
 
Registered: Feb 2003
Location: Santa Clara,CA
Distribution: Mandriva
Posts: 909

Rep: Reputation: 48
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 ?
 
Old 06-27-2003, 10:18 AM   #5
rch
Member
 
Registered: Feb 2003
Location: Santa Clara,CA
Distribution: Mandriva
Posts: 909

Rep: Reputation: 48
And I think I should ask you how come that you have only one post even though you have registered in october 2002?
 
Old 06-27-2003, 11:36 AM   #6
squirt
LQ Newbie
 
Registered: Oct 2002
Location: Canada
Distribution: Slackware
Posts: 2

Rep: Reputation: 0
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 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.
 
Old 06-27-2003, 10:24 PM   #7
DavidPhillips
Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,154

Rep: Reputation: 56
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.

Last edited by DavidPhillips; 06-27-2003 at 10:51 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SSH/rsync "Connection reset by peer" hamish Linux - Networking 6 12-10-2005 06:09 AM
ssh connection reset by peer Brain Drop Linux - Software 4 07-30-2004 09:18 PM
Connection reset by peer mijohnst Linux - Networking 7 07-14-2004 11:14 AM
Connection reset by peer digimike Linux - Networking 0 06-18-2003 10:53 PM
"Connection Reset By Peer" with SSH YMJ Linux - Networking 10 03-24-2003 06:19 AM


All times are GMT -5. The time now is 12:51 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration