http://www.perlmonks.org?node_id=1004580


in reply to Re^2: Net::OpenSSH fastest way to reconnect to a rebooted machine?
in thread Net::OpenSSH fastest way to reconnect to a rebooted machine?

Passing in parameters works for me, without having to loop & check the error condition:
my $ssh = Net::OpenSSH->new( $username . "\@" . $host, key_path => $key_path, master_opts => [-o => "ConnectionAttempts +=30", -o => "ConnectTimeout=10"] );
  • Comment on Re^3: Net::OpenSSH fastest way to reconnect to a rebooted machine?
  • Download Code