Simpler Navigation for Servers and Operating Systems
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
cancel
Showing results for 
Search instead for 
Did you mean: 

setting timeout value

Highlighted
tempsample
Frequent Advisor

setting timeout value

Hi

 

   for HOST in $(< /tmp/hostdetails.txt); do
   echo $HOST
   ssh  $HOST uptime | awk -F, '{sub(".*up", "", $1);print $1,$2}'
   done >> uptime.log

 

suppose if a host is unavailable  during uptime check,it should skip that particular host and check for the other server.

 

How can i make those time setting value ?

 

 

1 REPLY
Dennis Handly
Acclaimed Contributor

Re: setting timeout value

>How can I make those time setting value?

 

Try -o ConnectTimeout=##

-o option
Can be used to give options in the format used in the configuration file.  This is useful for specifying options for  which there is no separate command-line flag.  For full details of the options listed below, and their possible values, see  ssh_config(5).