ssh timeout

nitin.gizare at wipro.com nitin.gizare at wipro.com
Fri Sep 25 15:47:21 UTC 2009


HI
 
Thanks
 
Nitin

________________________________

From: redhat-sysadmin-list-bounces at redhat.com on behalf of Sutton, Harry (MSE)
Sent: Fri 9/25/2009 9:06 PM
To: redhat-sysadmin-list at redhat.com
Subject: Re: ssh timeout



But as someone else pointed out earlier, ssh already has built-in
mechanisms for dealing with this (TCPKeepAlive, ClientAliveInterval,
ClientAliveCountMax), so why jump through all these other hoops to
attain this functionality?

      /Harry

On 09/25/2009 11:16 AM, Howard, Chris wrote:
> You can kill a child process after a certain time
> has elapsed.
>
> So, you would have a parent shell script start
> up the ssh script and put it in the background (&).
> Then call sleep for some
> number of seconds.  When it wakes up if the
> child is still running ('kill -0 $pid')
> then you send it a kill signal ('kill -9 $pid').
> Use a file in /tmp for the child to pass back results
> to the parent process if it succeeds.
>
> Or, I think you could use a timeout signal
> in a perl script.
>
> Or, I think you could have the remote machine
> use ssh to put its information  onto a central
> monitoring machine periodically using cron or
> similar.  Then your monitoring program would
> just look at that centralized information and
> not do an ssh at all.
>
>
>
>   
>> -----Original Message-----
>> From: nitin.gizare at wipro.com [mailto:nitin.gizare at wipro.com]
>> Sent: Thursday, September 24, 2009 8:17 PM
>> To: redhat-sysadmin-list at redhat.com
>> Subject: ssh timeout
>>
>> HI
>>
>>
>>
>> I am running script using ssh to capture load of some parameters of
>> remote machine.
>>
>> But if one of machine is down script does not go forward and will be
>> waiting for to come up and complete ssh connections.
>>
>> I would like to set some time out in which case if machine does not
>> response it should time out on ssh and proceed for next steps.
>>
>>
>>
>> Please help me with this settings
>>
>>
>>
>> Rgds
>>
>> Nitin
>>     
>
> --
> redhat-sysadmin-list mailing list
> redhat-sysadmin-list at redhat.com
> https://www.redhat.com/mailman/listinfo/redhat-sysadmin-list
>
>   




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/redhat-sysadmin-list/attachments/20090925/178f5fba/attachment.htm>


More information about the redhat-sysadmin-list mailing list