in reply to Net::SSH::Perl hanging on creating object

You can use Net::OpenSSH that has support for timeouts:
my $ssh = Net::OpenSSH->new($host, timeout => 30); $ssh->error and die "Unable to connect to remote host $host: ". $ssh-> +error;

Replies are listed 'Best First'.
Re^2: Net::SSH::Perl hanging on creating object
by gepebril69 (Scribe) on Jun 09, 2011 at 11:16 UTC
    Thanks for all answers. I love this approach. And the solution works for me. The small script don't hang forever like it did before. I will try to implement all the current build functionality in Net:OpenSSH