LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-23-2007, 02:52 AM   #1
akash12
LQ Newbie
 
Registered: Aug 2007
Location: India
Posts: 2

Rep: Reputation: 0
ssh getting timeout


Hi,

I am facing ssh connection issue to our remote servers over VPN. Connection getting timout after few hours with following message

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

When connected from putty error message reads with popup

Putty Fatal error
Network Error:Software caused connection abort.

Did many configuration check on TCP keealive (both on source and target machine,

set 'Enable TCP Keepalive' in Putty, 'seconds between keepalives' set to different values.

Added entry in /etc/ssh/sshd_configuration as
ClientAliveInterval 300 on remote server.

Set in /etc/ssh/ssh_config as TCPKeepAlive yes on the machine from where remote machine is connected.

But no luck. Any guess why this is happening??

Nothing is blocking on at firewall and no rule is set like connection should be dropped after certain idle time.
 
Old 08-23-2007, 04:46 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
The only way I found to keep connections alive reliably was to set up tunnels with 'autossh' (it will restart connections if necessary). Since you use PuTTY you're using ClippyOS. Maybe it can be compiled under Cygwin but I don't know that, or maybe you could install it on an adjacent GNU/Linux box and use that for connecting to remote systems.
 
Old 08-23-2007, 05:37 AM   #3
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
i have putty keep sessions open for days at a time with the keepalive on. make sure that you're on the newest version, which had a few tweaks, but also load up wireshark and actually watch the keepalive packets hitting the machine, or their lack of.
 
Old 08-23-2007, 06:23 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
i have putty keep sessions open for days at a time with the keepalive on.
Sure, but where those on flakey connections?
 
Old 08-23-2007, 06:41 AM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
where did a dodgy connection come into the equation?
 
Old 08-23-2007, 06:57 AM   #6
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
where did a dodgy connection come into the equation?
Because that's all I can think of causing it if you already fiddled with all the keepalive controls?
 
Old 08-23-2007, 08:50 AM   #7
akash12
LQ Newbie
 
Registered: Aug 2007
Location: India
Posts: 2

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by acid_kewpie View Post
i have putty keep sessions open for days at a time with the keepalive on. make sure that you're on the newest version, which had a few tweaks, but also load up wireshark and actually watch the keepalive packets hitting the machine, or their lack of.
Thanks for the reply. I am using latest putty version elease 0.60.
Can run ethereal on machine from where ssh connection is made to remote servers and it's showing keepalive packets flooding. But I can't run etheral on remote server. Do you think that something is blocking at remote site??
 
Old 08-23-2007, 09:01 AM   #8
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
if you can log in at all then there should be no possible way to block keepalives unless their lack of payload or somethign is observed by a firewall or such, which as a rule of thumb i would really doubt.
 
  


Reply



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
SSH timeout not anywhere OpenSourcePaul Linux - Server 2 03-16-2007 04:03 PM
SSH: Timeout Swakoo Linux - Networking 8 09-07-2006 08:59 PM
SSH Timeout Swakoo Linux - General 4 04-17-2006 03:48 AM
SSH timeout goldenmag Linux - Security 2 12-10-2003 04:06 PM
ssh timeout blackmercury Linux - General 1 06-02-2003 05:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:11 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
Open Source Consulting | Domain Registration