Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 07-30-2007, 10:38 PM   #1
saje tilghman
LQ Newbie
Registered: Jul 2007
Posts: 2

Rep: Reputation: 0
SSH Login Won't Timeout

When trying to ssh into a server that is hung, the ssh won't timeout. The remote server responds to a ping, but nothing else (ssh, telnet - console is dead).

I have automated processes that login to many dozens of servers via ssh. When hitting these servers (two are hanging like this 2-3 times a month), the automated process hangs and never continues to the remaining servers.

Obviously, pinging the remote server to see if it is alive won't work, because it does answer, yet it is otherwise dead. Any ideas how to timeout the ssh or alternate method to see if the server is alive before attempting the ssh?

RH AS3.0, update4 / Dell 1[789]50, 2[678]50 series servers.
Old 07-30-2007, 11:28 PM   #2
Senior Member
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 332Reputation: 332Reputation: 332Reputation: 332
You can set the timeout. For example:

ssh -o ConnectTimeout=10 user@host

The value is in seconds. More info in 'man ssh'.
Old 08-02-2007, 10:24 AM   #3
saje tilghman
LQ Newbie
Registered: Jul 2007
Posts: 2

Original Poster
Rep: Reputation: 0
thanks for the info - it was a big help. Interesting that the options aren't listed on my system man/info pages, but I did find them online after seeing your response.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
SSH timeout not anywhere OpenSourcePaul Linux - Server 2 03-16-2007 04:03 PM
SSH: Timeout Swakoo Linux - Networking 8 09-07-2006 08:59 PM
SSH login timeout - too short tets Solaris / OpenSolaris 4 09-19-2005 03:34 AM
why ssh timeout? sherifff Linux - Networking 1 05-06-2004 09:30 PM
SSH timeout goldenmag Linux - Security 2 12-10-2003 04:06 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:13 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration