[NCLUG] ssh timeout

Matt Clauson mec at dotorg.org
Fri Mar 2 12:25:10 MST 2001


On Fri, Mar 02, 2001 at 12:13:40PM -0700, Mark Fassler wrote:
> On Fri, Mar 02, 2001 at 11:57:10AM -0700, Daniel Herrington wrote:
> > I have a coyote linux firewall box, and I'm running ssh to a machine
> > inside the firewall.  How can I increase the timeout value so that my
> > ssh session stays connected longer without my having to keep it alive
> > by typing in the term window?
> > 
> > Is it a firewall configuration setting, or and ssh configuration
> > setting, or both?
> 
> 
> This is an application thing.  In $HOME/.ssh/config put this:
> 
> 	KeepAlive yes
> 
> In /etc/ssh/sshd_config put this:
> 
> 	KeepAlive yes
> 
> You might also have to add KeepAlive to /etc/ssh/ssh_config

This is not only an application thing.  Linux, to keep tables from
growing out of control for orphaned entries, clears entries from the
masquerading table that have not seen traffic for a certain period of
time.  I believe the defaults are 15 minutes for TCP connections, and
5 minutes for UDP.  There is a way to change this without recompiling
the kernel source, but I'd have to RTFM, and I'm a bit busy at work
right now.

Mark's solution WILL work, but only for the SSH application.  Stuff
like low-traffice IRC server (with really screwed up PING-PONG
settings) will time out, as will low traffic telnet sessions, etc.
You're probably better off fixing the timeout value than fixing stuff
app by app.

--mec



More information about the NCLUG mailing list