polyp has asked for the wisdom of the Perl Monks concerning the following question:


I am using Net:SSH::Perl to establish a SSH connection but get an error when using variables as user and password.

The source code:
print("Username: "); $user = <STDIN>; chomp($user); print("Pass: "); $pass = <STDIN>; chomp($pass); $ssh->login($user,$pass); # $ssh is introduced earlier, of course
does not work !

The error message is:

input must be 8 bytes long at /usr/lib/perl5/site_perl/5.8.0/i386-linu +x-thread-multi/Crypt/ line 57.
When not using variables everything works fine:
#source: $ssh->login("root","root_pass");
The same thing happens when using the cmd-function,
$ssh->cmd($curr_cmd); does not work $ssh->cmd("ls -l"); DOES work !
Even the example script, which can be found at does not work and exits with the same error.

Does anybody know where my problem is ? I am running RedHat 9.0 with updated Perl modules (from CPAN).

Thanks for your help.


edited: Wed Jun 25 13:50:16 2003 by jeffa - code tags, removed br tags, linked url