ConnectTimeout=2 not working for me
Vahid Moghaddasi
vahid.moghaddasi at gmail.com
Sat Dec 26 09:53:06 EST 2009
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.
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.
Thanks,
More information about the openssh-unix-dev
mailing list