I am writing a script that executes a command remotely via SSH using perl. Timeout can happen when
a) SSH client is unable to connect
b) SSH client is able to connect but the remote command takes a lot longer (say > 5 minutes) to execute
For (a), theren is an option available in ssh client. For (b), I cannot find anything.
Thanks for any inputs
use Net::OpenSSH:
Though, read the entry about timeouts on the module docs.