Hi,
On Wed, Jan 17, 2001 at 09:15:10AM -0700, Gary Shea
wrote:> Recently set up OpenSSH on a number of machines that I'd been using
> ssh2 on (illegally, it turns out... gotta read the small print!).
> OpenSSH is working great except for one small thing.
>
> If I leave an openssh connection untouched for a few hours, it seems to
> automatically disconnect. I don't see this behaviour with ssh.com
> ssh, either v1 or v2.
>
> I have Keep-Alive set to 'no' for both openssh and commercial ssh,
but
> can't find any other possibly relevant directives. Am I missing
something
> obvious?
This sounds like a problem I experienced, wherein a connection that
was inactive over a period of time "hangs" because an intermediate
router that was masquerading IP addresses timed-out the masquerade
table entries due to inactivity (30 minutes in my case). The solution
is to:
1. enable keep alive on either the client or server (in my case, it was
logical to do both, as it was an issue for both incoming and outgoing
connections. That is:
KeepAlive yes
in both sshd_config and and ssh_config (or $HOME/.ssh/config).
2. Fix ssh and sshd so that they honor the keep alive request for
both protocol 1 and 2. See my previous email to the list of Jan 12
which has relevant patches, subject: Re: Socket options not properly
set for ssh and sshd. I'll forward that off-list.
I see by checking out top-of-tree Openssh with anonymous CVS that
as of yesterday, the patch is in the OpenBSD version of Openssh,
but not yet in the portable version. The patch is not yet in any
released version. (I'd expect to see it in the V2.4.0 release).