Bug 443 - Ability to set KeepAlive time
Summary: Ability to set KeepAlive time
Status: CLOSED WONTFIX
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: ssh (show other bugs)
Version: -current
Hardware: All All
: P2 normal
Assignee: OpenSSH Bugzilla mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-11-25 13:47 AEDT by Dan
Modified: 2004-04-14 12:24 AEST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dan 2002-11-25 13:47:54 AEDT
I currently have to deal with a (arguably broken) firewall which likes to drop
connections that have been idle for more than a couple minutes. Unfortunately,
while ssh gives me the option of using keepalives, it doesn't give me a way to
set the keepalive time, and, since the default is 3 hours, it doesn't do me much
good.

What I'd love to see is either a KeepAliveTime option indicating a number of
seconds between keepalives if KeepAlive is "on", or make KeepAlive itself take a
number of seconds as an option.

Thanks!

-dan
danfuzz@milk.com
Comment 1 Darren Tucker 2002-11-25 14:37:54 AEDT
The "KeepAlive" option enables TCP_KEEPALIVE on the socket which uses a 
system-wide setting (normally 2 hours according to Stevens.)

There is a "Heartbeat" patch for openssh which does what you want, see
http://www.sc.isc.tohoku.ac.jp/~hgot/sources/openssh-watchdog.html
Comment 2 Dan 2002-11-25 14:54:37 AEDT
Thanks for the reference to the heartbeat patch; I'll probably be installing it
shortly.

However, I should note that at least on some systems (on mine at least), there
*is* a TCP option to change the keepalive time.
Comment 3 Damien Miller 2002-12-03 22:56:45 AEDT
You probably want ClientAliveInterval in sshd_config
Comment 4 Damien Miller 2003-01-03 14:58:09 AEDT
As mentioned, TCP keepalives are a system-wide setting. On linux you can tweak
them using "sysctl -w net.ipv4.tcp_keepalive_time=xxx" or through /proc/sys

Adding protocol-level keepalives to the client (they are already in the server)
is a separate issue (and bug).
Comment 5 Damien Miller 2004-04-14 12:24:18 AEST
Mass change of RESOLVED bugs to CLOSED