ssh freezes when trying to connect to some hosts
Posted
by
NS Gopikrishnan
on Super User
See other posts from Super User
or by NS Gopikrishnan
Published on 2012-03-08T10:29:58Z
Indexed on
2012/03/28
11:33 UTC
Read the original article
Hit count: 227
When I try to ssh to particular machine/s in a list, The SSH command happens to be freezing. I tried out setting ssh timeout. But then also it's freezes even after the timeout.
In verbose mode :
OpenSSH_3.9p1, OpenSSL 0.9.7a Feb 19 2003
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to x358.x.server.com [10.x.x.x] port 22.
debug1: fd 3 clearing O_NONBLOCK
debug1: Connection established.
debug1: identity file /export/home/sqlrpt/.ssh/identity type -1
debug1: identity file /export/home/sqlrpt/.ssh/id_rsa type -1
debug1: identity file /export/home/sqlrpt/.ssh/id_dsa type 2
At this point it freezes.
A work around I thought was to create a child process for each ssh calls and if the process doesn't respond after a timeout - Kill it. But are there any less complex ways, so that I can accommodate it in a shell script itself rather than going for a C/C++ program ?
© Super User or respective owner