LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-27-2015, 04:00 AM   #1
BhushanPathak
Member
 
Registered: Nov 2013
Location: Pune, India
Distribution: CentOS
Posts: 36

Rep: Reputation: Disabled
CentOS 6 - Connection reset by peer error


Hi,

I have a CentOS 6 machine [Machine X], which I connect to using a putty client or from another CentOS 6 machine.

Now, the machine X intermittently sends a connection reset message to all SSH sessions -

Code:
Read from remote host 1.1.1.1: Connection reset by peer
Connection to 1.1.1.1 closed.
I have switched off the firewall on the machine & there are no session timeout values set.

How do I find out what is causing this issue?


Thanks

Bhushan

Last edited by BhushanPathak; 05-27-2015 at 04:02 AM.
 
Old 05-27-2015, 07:53 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 14,931

Rep: Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520
ssh has a built in timeout that disconnects the client if data is not received after so many seconds.

You can change the values of ServerAliveInterval and ClientAliveCountMax in the configuration files.

http://www.cyberciti.biz/faq/create-...on-linux-unix/
 
1 members found this post helpful.
Old 05-28-2015, 05:02 AM   #3
BhushanPathak
Member
 
Registered: Nov 2013
Location: Pune, India
Distribution: CentOS
Posts: 36

Original Poster
Rep: Reputation: Disabled
That might help with SSH sessions initiated from a linux machine to Machine X. What about SSH sessions initiated from Windows OS via putty?

Thanks
Bhushan Pathak
 
Old 05-28-2015, 06:28 AM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 14,931

Rep: Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520
putty also has a similar setting.
 
1 members found this post helpful.
Old 05-28-2015, 06:50 AM   #5
BhushanPathak
Member
 
Registered: Nov 2013
Location: Pune, India
Distribution: CentOS
Posts: 36

Original Poster
Rep: Reputation: Disabled
Is the builtin timeout as part of the openssh code? Or some setting that I can change?
 
Old 05-28-2015, 07:32 AM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 14,931

Rep: Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520
A setting you can change. Did you read the link I posted?
 
Old 05-28-2015, 08:09 AM   #7
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,602

Rep: Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241
and it is sshd that enforces the timeout, not the client.

Most have a "keep alive" option you CAN set though. It causes a small packet to be sent (and discarded) every so often to reset the timeout.

The purpose of the timeout is to avoid the 10-15 minute timeout of TCP connections as that opens a potential denial of service attack (open new connections faster than they timeout...)
 
1 members found this post helpful.
Old 05-28-2015, 11:36 PM   #8
RMLinux
Member
 
Registered: Jul 2006
Posts: 260

Rep: Reputation: 37
http://superuser.com/questions/29482...nnection-abort
 
1 members found this post helpful.
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ERROR reading from socket: Connection reset by peer sweetytweety Linux - Newbie 3 05-16-2008 06:21 AM
FreeNX help. When I try to connect I get error msg (connection reset by peer) MegaSvensk Linux - Software 1 10-18-2007 03:09 PM
welcome response error + connection reset by peer rnj Linux - Software 0 10-20-2004 11:04 AM
Network error: Connection reset by peer jeffpoulsen Linux - Networking 0 10-09-2003 07:31 PM
Network Error: Connection Reset by Peer Bob Welch Linux - Networking 3 12-09-2002 02:07 PM


All times are GMT -5. The time now is 10:33 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration