Re: setting timeout value (105 Views)
Reply
Frequent Advisor
tempsample
Posts: 100
Registered: ‎06-20-2013
Message 1 of 2 (136 Views)

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 ?

 

 

Please use plain text.
Acclaimed Contributor
Dennis Handly
Posts: 24,877
Registered: ‎03-06-2006
Message 2 of 2 (105 Views)

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).

Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation