SSH KeepAlive

My internet access is pathetic enough that idle SSH connections across the DSL modem die within a few minutes. It is quite frustrating to find all your shells are dead when you come back from making dinner or taking a shower.

If you have access to the server configuration, the following additions to /etc/ssh/sshd_config will keep your connections from dying so readily:

KeepAlive yes
ClientAliveInterval 60
ClientAliveCountMax 10

The value for ClientAliveInterval is seconds, so this setup will attempt to keep the ssh connection active once a minute, up to ten times. So after ten minutes, orphaned shells are killed, which keeps the number of orphaned sessions to a minimum.

 
linux/ssh_keepalive.txt · Last modified: 2005/03/20 16:05 by 63.230.62.115
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki