ConnectTimeout=2 not working for me
Damien Miller
djm at mindrot.org
Sat Dec 26 10:09:14 EST 2009
On Fri, 25 Dec 2009, Vahid Moghaddasi wrote:
> On Fri, Dec 25, 2009 at 4:07 PM, Bryan Whitehead <driver at megahappy.net>
> wrote:
> Try using ServerAliveInterval=3 and a reasonable
> ServerAliveCountMax as well. The full TCP handshake could be
> happening but then sshd might not be doing anything with the
> established tcp connection. ConnectTimeout will only bail if
> there is a problem setting up the connection. Once the
> connection is established ConnectTimeout's job is done.
>
> I tried ssh -o ServerAliveCountMax=5 -o ServerAliveInterval=1 -o
> ConnectTimeout=3 user at server "date" but the connection still hung. I tried
> with OpenSSH_4.3p2 and OpenSSH_5.2p1 with same result. I also added
> ServerAliveCountMax 5
> ServerAliveInterval 1 hoping that may have a different affect.
Please post a client debug trace from a failing connection. It isn't possible
to determine what is going wrong without it: "ssh -vvv host"
> There might be a bug as I see some people reported:
> http://marc.info/?l=openssh-unix-dev&m=121081969105167&w=2
> The SSH on the server side are different version on different platform but I
> don't think that would matter anyway.
> How would I count the connection seconds in my script and kill the hung
> process.
I think that bug was fixed. Certainly, ServerAliveCount works for me.
-d
More information about the openssh-unix-dev
mailing list