Persistent SSH sessions

Peter Stuge peter at stuge.se
Tue Aug 3 06:04:52 EST 2010


Mukund Sivaraman wrote:
> I have an ADSL modem which reboots
..
> I tried the following configuration:
> 
> sshd_config on server:
>   TCPKeepAlive no
>   ClientAliveInterval 90
>   ClientAliveCountMax 6
> 
> ~/.ssh/config:
>   Host *
>     Protocol 2
>     Compression yes
>     TCPKeepAlive no
>     ServerAliveInterval 90
>     ServerAliveCountMax 6
..
> I want to know if there is any way I can get ssh to try to
> renegotiate the active sessions to remote servers, without
> disconnecting them.
..
> I am looking for a specific answer about how to keep a session
> alive, or the impossibility of doing that.

I think you need to completely disable the serveralive and possibly
also clientalive stuff. That's the only thing that I've found to work
well so far. With those disabled on the other hand, and if running
over a VPN, I can go disconnected for forever as long as I don't
type anything, and a good while even if I do type something by
mistake.


//Peter


More information about the openssh-unix-dev mailing list