- or download this
$ssh2->auth_password($login{user}, $login{password})
or die "Auth failed";
- or download this
$ssh2->auth_ok() or die "Not authorized";
- or download this
use warnings;
use Net::SSH2;
...
while (<$channel>) {push @output, $_}
print scalar @output, "\n"; # See no. of entries
print for @output;