I had a similar problem and couldn't figure it out. The code snippet below usually works around it for my purposes:
my $retry_count = 0; while(1){ $rc = eval{$ssh->login();}; last if defined $rc; last if $retry_count >= $max_retry_count; $retry_count++; sleep 1; }
In reply to Re: Net::SSH::Perl, Net::SSH::Expect crashes script if host is unreachable
by jrsimmon
in thread Net::SSH::Perl, Net::SSH::Expect crashes script if host is unreachable
by LadyEngineer
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |