[Ssh-sftp-perl-users] Net::SSH2 - handling connect timeout condition
Brought to you by:
dbrobins
From: Ravi K. <rav...@gm...> - 2008-06-02 22:47:35
|
Hi, I am seeing that connect aborts the script execution when the host is not reachable. Is it possible to make it change this behavior? I would like it to continue so that I can probably check error to see if an error occurred and exit gracefully. I have been unsuccessful in finding any doc/example that handle this error condition. my $ssh = Net::SSH2->new(); $ssh->debug(1); $ssh->connect("1.2.6.6"); if ($ssh->error) { print "cannot connect"; exit; } |