ssh timeout

Vram lamsokvr at xprt.net
Sat Dec 25 06:25:12 UTC 2004


On Sat, 2004-12-25 at 06:06 +0000, Sean Miller wrote:
> Anybody here use ssh to access remote servers across the internet?
> 
> If so, I have a wireless network/ADSL combination and what happens is 
> that if you leave a ssh session inactive for more than, say, 5 minutes 
> (may be longer -- not sure) it hangs. Not sure why this is, but it seems 
> to have started happening since the wireless so guess it may have 
> something to do with that...
> 
> Anyway, on puTTY (Windows) there is a "keepalive" option which means 
> this does not happen -- what I guess it must do is send a sync message 
> every minute or so, but what I wondered was... is there anything similar 
> on the standard Linux ssh ? I ask because whilst this timeout at a shell 
> prompt is not an issue, if it happens when editing a file using vi the 
> resulting zombie process seems to "panic" and start using ridiculously 
> high amounts of CPU.
> 
> Any ideas?
> 
> Sean
> 


>From man ssh_config


 TCPKeepAlive
Specifies whether the system should send TCP keepalive messages
to the other side.  If they are sent, death of the connection or
crash of one of the machines will be properly noticed.  This
option only uses TCP keepalives (as opposed to using ssh level
keepalives), so takes a long time to notice when the connection
dies.  As such, you probably want the ServerAliveInterval option
as well.  However, this means that connections will die if the
route is down temporarily, and some people find it annoying.

 The default is ``yes'' (to send TCP keepalive messages), and the
 client will notice if the network goes down or the remote host
 dies.  This is important in scripts, and many users want it too.

 To disable TCP keepalive messages, the value should be set to
             ``no''.



HTH

Vram







More information about the ubuntu-users mailing list