No_Germs
October 16th, 2008, 10:25 PM
Hi,
I'm trying to connect to a server, and even though i set the timeout param, and some servers i try to connect to do time out, one particular server causes the ssh to get stuck. I don't care if i don't manage to connect to it, but i don't want the ssh to hang forever since it will be run inside a script.
running
ssh -o ConnectTimeout=1 -v -l uname server
outputs
OpenSSH_4.7p1 Debian-8ubuntu1.2, OpenSSL 0.9.8g 19 Oct 2007
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to server [IP] port 22.
debug1: fd 3 clearing O_NONBLOCK
debug1: Connection established.
debug1: identity file /home/user/.ssh/identity type -1
debug1: identity file /home/user/.ssh/id_rsa type 1
debug1: identity file /home/user/.ssh/id_dsa type -1
after that nothing else is printed and the whole thing is stuck until I CTRL-C. The RSA key is 100% ok.
Again, the exact same procedure does work for me for other servers - to some i manage to login and some don't respond and cause a time out, but only this one causes the ssh to hang.
Any ideas?
I'm trying to connect to a server, and even though i set the timeout param, and some servers i try to connect to do time out, one particular server causes the ssh to get stuck. I don't care if i don't manage to connect to it, but i don't want the ssh to hang forever since it will be run inside a script.
running
ssh -o ConnectTimeout=1 -v -l uname server
outputs
OpenSSH_4.7p1 Debian-8ubuntu1.2, OpenSSL 0.9.8g 19 Oct 2007
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to server [IP] port 22.
debug1: fd 3 clearing O_NONBLOCK
debug1: Connection established.
debug1: identity file /home/user/.ssh/identity type -1
debug1: identity file /home/user/.ssh/id_rsa type 1
debug1: identity file /home/user/.ssh/id_dsa type -1
after that nothing else is printed and the whole thing is stuck until I CTRL-C. The RSA key is 100% ok.
Again, the exact same procedure does work for me for other servers - to some i manage to login and some don't respond and cause a time out, but only this one causes the ssh to hang.
Any ideas?