[nSLUG] SSH timeouts (failure to login)

InverseCow rowan.townshend at gmail.com
Fri Mar 19 14:16:48 ADT 2010

Hello all,

  I am attempting to write a script which involves ssh'ing to a host to
check if a process is running.
  I am hitting a wall though, in that some of the hosts may be
"unresponsive" (pingable, but hung).
  As such, my SSH connection attempt "hangs" for a long time.
  Is there a method to have it timeout after a period of time (via SSH
configuration options)?
  I have played with the "$TMOUT" value, as well I have tried using
"ConnectTimeout 120" in my ~/.ssh/config, but to no avail.  If need be, I
could run this inside a WHILE loop, but would rather handle it more
elegantly then that.

  Does anyone have else have any experience / tricks / voodoo magic on this

  NOTE: This is purely for timing out on login, not to terminate "idle"
sessions which have successfully connected.

-Rowan Townshend

"Just because I have a burnt face, doesn't mean I can't fight crime!" -- 
http://www.burntfaceman.com/ http://www.burntfaceman.com/ 
View this message in context: http://old.nabble.com/SSH-timeouts-%28failure-to-login%29-tp27951001p27951001.html
Sent from the nSLUG mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nslug.ns.ca/mailman/private/nslug/attachments/20100319/189298f2/attachment-0002.html>

More information about the nSLUG mailing list