in reply to Net:SSH:Perl Bug?

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.

For me, DES.pm contains:
52: sub encrypt 53: { 54: usage("encrypt data[8 bytes]") unless @_ == 2; 55: 56: my ($self,$data) = @_; 57: return Crypt::DES::crypt($data, $data, $self->{'ks'}, 1); 58: }

It's that first argument to Crypt::DES::crypt() that needs to be 8 bytes long. I would try inserting a print statement in there - on both the successful and the failing machines. Hopefully, the difference in the output will enable you to determine the cause of the problem (and the solution). Try changing that code to (untested):
sub encrypt { usage("encrypt data[8 bytes]") unless @_ == 2; my ($self,$data) = @_; print "\nMY DEBUG: ", length($data), " ", $data, "\n\n"; return Crypt::DES::crypt($data, $data, $self->{'ks'}, 1); }


Cheers,
Rob

Replies are listed 'Best First'.
Re^2: Net:SSH:Perl Bug?
by neptuna (Acolyte) on Sep 08, 2006 at 15:36 UTC
    Thanks Rob, I will give it a try