Hi,
I have a script that I have been running successfully on perl 5.6.1. It uses
Net::SSH to send the code of another perl script to a remote host.  I tried
to move the script(s) to a new box running 5.8 and it errors out while
trying to run the cmd method on the command string passed to it. Here is the
error (that is very misleading) and the relevant parts of the script.  For
some reason if I try to feed a `cat` to the $cmd string, it does not work
--
use Net::SSH::Perl;
$host = "somehost";
my $ssh = Net::SSH::Perl->new($host,
                               protocol => '2',
                               debug => 1,
                               privileged => 0);

#  THIS FAILS, WORKED FINE BEFORE
#my $cmd = "perl -e '".`cat ./cm-unix.pl`."'";
#   THIS IS JUST A ONE LINE FILE with 'ls-l' THAT FAILS
my $cmd = `cat GO`;
# WORKS FINE
my $cmd = 'cd /tmp; ls -l';

$ssh->login( $ENV{USER} );
my($stdout, $stderr, $exit) = $ssh->cmd($cmd);
...

ERROR:
input must be 8 bytes long at
/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/Crypt/DES.pm line 57.
---

I have tried google and searching throug the archives but not have been able
to find out why this happens

Thanks for any help,
Jim









-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to