LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  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
macemoneta
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: 344Reputation: 344Reputation: 344Reputation: 344
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.
 
  


Reply

Tags
ssh



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:43 AM.

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