Subject: | 'input must be 8 bytes lon'g in Net::SSH::Perl |
Hi,
When i use Net::SSH::Perl i have this error:
input must be 8 bytes long at /usr/local/lib/perl/5.10.0/Crypt/DES.pm
line 57.
My function is:
sub checkHostConnectivity($$$$){
my $hostname = shift;
my $port = shift;
my $username = shift;
my $password = shift;
my %params = (port => $port, debug=>1, use_pty=>1 );
$connection = Net::SSH::Perl->new( $hostname , %params );
if ( my $error = $@ ) {
chomp $error;
&logmessage("Failed to connect to '$hostname'. Reason: '$@'");
return "fail";
}
if (!$password || $password =~ /^HASH\(0x[A-Fa-f0-9]+\)/ ){
$connection->login( $username )or do{my $error = $@; chomp $error;
&logmessage("Error to login with $username to '$hostname'. Reason:
'$error'"); return "fail"; };
}else{
$connection->login( $username, $password )or do{my $error = $@; chomp
$error; &logmessage("Error to login with $username to '$hostname'.
Reason: '$error'"); return "fail"; };
}
$connection->cmd("/bin/false");
return "ok";
}
Is this a bug?