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


in reply to Re: Perl Net::SSH2 unable to connect
in thread Perl Net::SSH2 unable to connect

From the perldoc:

VinsWorldcom@C:\Users\VinsWorldcom> perldoc Net::SSH2 [...] error Returns the last error code; returns false if no error. In list cont +ext, returns (code, error name, error string). [...]

I would try calling the error() accessor like such (untested):

use Net::SSH2; [...] my $ssh2 = Net::SSH2->new(); [...] my ($code, $name, $string) = $ssh2->error; print "Error ($code): $name - $string\n";