gopalreddy has asked for the wisdom of the Perl Monks concerning the following question:

I have a perl script to connect to remote host using SSH2 and execte commands. Script creates connection, opens channel, executes the commands and closed channel and connection. This script is called by some scheduler process which wil execute at 30 sec interval. it is working fine, but has script doesn't execute the commands when the remote SSH is reset(down and up). It works fine when i restart the scheduler. Can any one help?

Replies are listed 'Best First'.
Re: channel blocking
by AppleFritter (Vicar) on Jul 24, 2014 at 11:09 UTC
Re: channel blocking
by jellisii2 (Hermit) on Jul 24, 2014 at 12:02 UTC
    AppleFritter is right in saying that your initial writeup is a bit sparse, but I'm going to take a stab: Check the timeout setting on whatever SSH module you're using. I'll bet it's longer than 30 seconds. If the server barfs, the connection won't drop until that timeout is hit.