Skip Menu |

This queue is for tickets about the Net-SFTP CPAN distribution.

Report information
The Basics
Id: 18952
Status: resolved
Priority: 0/
Queue: Net-SFTP

People
Owner: Nobody in particular
Requestors: Shaik.Abdul-Rahman [...] ubs.com
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: (no value)
Fixed in: (no value)



Subject: Received disconnect message: Bad packet length
Hi, I am using perl 5.8.8 for SFTP. when I run that during logon i get the following error. But when I try that in interactive mode its going fine. The verion of SSH we use is : OpenSSH_3.9p1, OpenSSL 0.9.6b [engine] 9 Jul 2001 Perl -V sh-2.05$ /sbcimp/run/pd/perl/5.8.8/bin/perl -v This is perl, v5.8.8 built for i686-linux-thread-multi Copyright 1987-2006, Larry Wall The OS details : (name masked) Linux xXXXYYYYYdap 2.4.9-e.37enterprise #1 SMP Mon Jan 26 11:20:59 EST 2004 i686 unknown Received disconnect message: Bad packet length 167772160. at /sbcimp/run/pd/cpan/5.8.8-2006.03/lib/Net/SSH/Perl/Kex/DH1.pm line 41 The below output is from debug mode ( usename and password is masked) ================================================================== DB<1> n main::(ftp_control.pl:332): $ftp = Net::SFTP->new ("$Machine",user=>"$UserId",password=>"$Password") || die "Could not Connect : $@ \n"; DB<1> n Received disconnect message: Bad packet length 167772160. at /sbcimp/run/pd/cpan/5.8.8-2006.03/lib/Net/SSH/Perl/Kex/DH1.pm line 41 at /sbcimp/run/pd/cpan/5.8.8-2006.03/lib/Net/SSH/Perl/Packet.pm line 84 Net::SSH::Perl::Packet::read_poll ('Net::SSH::Perl::Packet', 'Net::SSH::Perl::SSH2=HASH(0x8b6c4c4)') called at /sbcimp/run/pd/cpan/5.8.8-2006.03/lib/Net/SSH/Perl/Packet.pm line 45 Net::SSH::Perl::Packet::read ('Net::SSH::Perl::Packet', 'Net::SSH::Perl::SSH2=HASH(0x8b6c4c4)') called at /sbcimp/run/pd/cpan/5.8.8-2006.03/lib/Net/SSH/Perl/Packet.pm line 220 Net::SSH::Perl::Packet::read_expect ('Net::SSH::Perl::Packet', 'Net::SSH::Perl::SSH2=HASH(0x8b6c4c4)', 31) called at /sbcimp/run/pd/cpan/5.8.8- 2006.03/lib/Net/SSH/Perl/Kex/DH1.pm line 41 Net::SSH::Perl::Kex::DH1::exchange ('Net::SSH::Perl::Kex::DH1=HASH(0x8b6c584)') called at /sbcimp/run/pd/cpan/5.8.8-2006.03/lib/Net/SSH/Perl/Kex.pm line 100 Net::SSH::Perl::Kex::exchange('Net::SSH::Perl::Kex::DH1=HASH (0x8b6c584)') called at /sbcimp/run/pd/cpan/5.8.8- 2006.03/lib/Net/SSH/Perl/SSH2.pm line 89 Net::SSH::Perl::SSH2::_login('Net::SSH::Perl::SSH2=HASH (0x8b6c4c4)') called at /sbcimp/run/pd/cpan/5.8.8- 2006.03/lib/Net/SSH/Perl/SSH2.pm line 66 Net::SSH::Perl::SSH2::login('Net::SSH::Perl::SSH2=HASH (0x8b6c4c4)', 'abdulrsh', 'welcome50', 'supress_shell') called at /sbcimp/run/pd/cpan/5.8.8-2006.03/lib/Net/SFTP.pm line 62 Net::SFTP::init('Net::SFTP=HASH (0x8b6c398)', 'user', 'XXXXYYYY, 'password', 'XXXXYYYY') called at /sbcimp/run/pd/cpan/5.8.8-2006.03/lib/Net/SFTP.pm line 24 Net::SFTP::new ('Net::SFTP', 'xXXXYYYYdap', 'user', 'XXXXYYYY, 'password', 'XXXXYYYY') called at ftp_control.pl line 332 Debugged program terminated. Use q to quit or R to restart, use o inhibit_exit to avoid stopping after program termination, h q, h R or h o to get additional info. ==========================================
From: peter [...] psdt.com
I got precisely this error when I had the -l flag set on the perl invocation. Check that.
From: Shaik.Abdul-Rahman [...] ubs.c
On Tue May 30 21:07:39 2006, PJS wrote: Show quoted text
> I got precisely this error when I had the -l flag set on the perl > invocation. Check that.
Thanks for the info. But we were not invoking with '-l' option. Finally we got the solution , We had script with just a connect and copy nothing else with all the hard coded values. That worked fine and we have traces back from them and finall located the line which was causing. $, = ' '; # set output field separator #$\ = "\n"; # set output record separator The second line was causing the issue,We commented that line and it went fine. This line made the user name and password to go with extra line. finally resolved.