Thread

Posted on Tue May 2 00:05:05 2006 by arul
input must be 8 bytes long at DES.pm line 58.
I have integrated NET:SFTP module and trying test the "sftp put" fuctionality.
put($lclfile, "$remfile");
Occasionally I get this error "input must be 8 bytes long at DES.pm line 58.".
When I execute the same command next time the sftp put works fine.
Any clue?
Direct Responses: 2226 | Write a response
Posted on Tue May 2 22:09:54 2006 by arul in response to 2224
Re: input must be 8 bytes long at DES.pm line 58.
More precisely I get this error first time after SFTP setup.After exchanging the keys. Please help..
Direct Responses: 2569 | Write a response
Posted on Mon Jul 3 08:30:56 2006 by lyask in response to 2226
Re: input must be 8 bytes long at DES.pm line 58.
Hi arul, Have you resolved this issue yet? I also encountered this problem when using Net-SFTP. It seems wired and I can't find the exactly solution to it. So if you have find the reason for it, could you please send a mail to me at liyongzju@gmail.com? Thanks a lot! -Leo
Direct Responses: 2747 | Write a response
Posted on Thu Aug 3 15:18:18 2006 by rahed in response to 2569
Re: input must be 8 bytes long at DES.pm line 58.
Possible culprit could be encoding. Your input has to have characters 8 byte long. If it's in e.g. utf8, change it this way: from_to ($input,'utf8','iso-8859-1') where from_to must be imported from Encode module. Radek
Direct Responses: 4443 | 4444 | Write a response
Posted on Tue Feb 27 18:18:58 2007 by jestill in response to 2747
Re: input must be 8 bytes long at DES.pm line 58.
I was having the same problem when sending a User Password that was taken from the command line. The following code worked for me:
use utf8; # .. MORE CODE HERE .. # GET USER PASSWORD print "\nPassword for $UserName\n"; system('stty', '-echo') == 0 or die "can't turn off echo: $?"; my $UserPassword = <STDIN>; system('stty', 'echo') == 0 or die "can't turn on echo: $?"; chomp $UserPassword; # Remove newline character # Convert to utf8 to avoid problem with DES.pm module utf8::encode ($UserPassword); # THE SFTP CONNECTION THEN WORKS AS $sftp = Net::SFTP->new( $IndTarget, user=> $UserName, password=> $UserPassword, debug=>"true");
Write a response
Posted on Tue Feb 27 18:23:24 2007 by jestill in response to 2747
Re: input must be 8 bytes long at DES.pm line 58.
I was having the same problem when sending a User Password that was taken from the command line. The following code worked for me:
use utf8; # .. MORE CODE HERE .. # GET USER PASSWORD print "\nPassword for $UserName\n"; system('stty', '-echo') == 0 or die "can't turn off echo: $?"; my $UserPassword = <STDIN>; system('stty', 'echo') == 0 or die "can't turn on echo: $?"; chomp $UserPassword; # Remove newline character # Convert to utf8 to avoid problem with DES.pm module utf8::encode ($UserPassword); # THE SFTP CONNECTION THEN WORKS AS $sftp = Net::SFTP->new( $IndTarget, user=> $UserName, password=> $UserPassword, debug=>"true");
Write a response