polyp has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
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:does not work !print("Username: "); $user = <STDIN>; chomp($user); print("Pass: "); $pass = <STDIN>; chomp($pass); $ssh->login($user,$pass); # $ssh is introduced earlier, of course
The error message is:
When not using variables everything works fine:input must be 8 bytes long at /usr/lib/perl5/site_perl/5.8.0/i386-linu +x-thread-multi/Crypt/DES.pm line 57.
The same thing happens when using the cmd-function,#source: $ssh->login("root","root_pass");
Even the example script cmd.pl, which can be found at http://search.cpan.org/src/BTROTT/Net-SSH-Perl-1.23/eg/cmd.pl 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).$ssh->cmd($curr_cmd); does not work $ssh->cmd("ls -l"); DOES work !
Thanks for your help.
Markusedited: Wed Jun 25 13:50:16 2003 by jeffa - code tags, removed br tags, linked url
Back to
Seekers of Perl Wisdom