Stephen Gran on 22 Oct 2005 17:00:03 -0000


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] SSH timeout


On Sat, Oct 22, 2005 at 12:45:50PM -0400, Doug Crompton said:
> I am trying to maintain an SSH <> Putty connection on my local network
> between my Linux server and a WinXP machine running putty.  The problem is
> I let the WinXP machine lapse into suspend mode. If I come back hours
> later the connection is hosed. I put a 'keepalive no' in the ssh config in
> Linux and have no kepalives defined in putty. It is my understanding from
> ssh docs that this is the wa to keep a session opened. It still closes. I
> was reading on the net about router timeouts, in particuliar NAT
> inactivity timeouts but that should not effect this as it is on the local
> network. This must be a lower level timeout as ssh<>putty sessions I
> open without suspend but no actual activity, do not timeout. Any ideas?

'keepalive' in ssh and many other applications is somewhat of a misnomer
- it is more accurately described as 'dead peer detection'.  Basically,
enabling the option makes ssh send keepalive packets every so often, and
if it gets no response, it kills the connection.  Enabling keepalive on
a connection when the other side is likely to suspend and not answer for
a while would get your connection killed, so you are right to disable it
here.

My first way to debug it would be to tcpdump from the linux machine, and
watch what happens when you bang on the keyboard on the WinXP machine -
do you see packets go back and forth?  Does the linux machine send back
an icmp port unreachable? Does the winXP box send back icmp port
unreachables?  Does one side send packets that the other side just
silently drops?

My first guess is that the WinXP box's network stack gets confused when
it suspends and wakes up again, and it no longer recognizes the ssh
session as established, and refuses traffic for it, but it's totally a
guess - look at the actual traffic to see.

HTH,
-- 
 --------------------------------------------------------------------------
|  Stephen Gran                  | All international orders must be        |
|  steve@lobefin.net             | accompanied by payment in U. S. funds.  |
|  http://www.lobefin.net/~steve |                                         |
 --------------------------------------------------------------------------

Attachment: signature.asc
Description: Digital signature

___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug