sugarboy has asked for the wisdom of the Perl Monks concerning the following question:

Hi All,

I have been facing an error when trying to unmount a remote share using Net::SSH::Perl as well as when trying to delete it.

umount -f /mnt/nfs_share_CrpgC Failed to execute the command umount -f /mnt/nfs_share_CrpgC on han2 : Bad packet length 737686377 at /usr/lib/perl5/site_perl/5.8.8/Net/SSH/Perl/Packet.pm line 175

rm -rf /mnt/nfs_share_CrpgC Failed to execute the command rm -rf /mnt/nfs_share_CrpgC on han2 : padding error: need 737686373 block 8 at /usr/lib/perl5/site_perl/5.8.8/Net/SSH/Perl/SSH2.pm line 328

Can any one help me to determine what could be the reason for this?

Thanks,
Sagar
  • Comment on Bad packet length 737686377 at /usr/lib/perl5/site_perl/5.8.8/Net/SSH/Perl/Packet.pm line 175

Replies are listed 'Best First'.
Re: Bad packet length 737686377 at /usr/lib/perl5/site_perl/5.8.8/Net/SSH/Perl/Packet.pm line 175
by Khen1950fx (Canon) on Jul 29, 2010 at 10:34 UTC
    This isn't answer but an educated guess. Without your code, it's hard to tell what's going on. I'm not entirely sure that your problem is with Net::SSH::Perl. As I see it, it could be a system problem with configuration. Have you checked /etc/ssh_config and /etc/fstab? On the other hand, if it is a problem with Net::SSH::Perl, I'd be willing to guess that it has something to do with the MAX_PACKET_SIZE. If the rmax is over or short, it could cause the problem. I'd use Net::SSH::Perl::Constants because you must explicitly request a constant. Here's an simple example:
    #!/usr/bin/perl use strict; use warnings; use Net::SSH::Perl; use Net::SSH::Perl::Constants qw(MAX_PACKET_SIZE); my $host = 'host'; my $user = 'user'; my $pass = 'pass'; my $cmd = 'perldocs Net::SSH::Perl::Constants'; my $ssh = Net::SSH::Perl->new( $host, debug => 1, protocol => 2 ); $ssh->login($user, $pass); my($stdout, $stderr, $exit) = $ssh->cmd($cmd); print $stdout, "\n";
      I'm actually getting a similar message right now. I've found some information that indicates this *might* be related to a "dirty" ssh connection, wherein some "junk" gets injected into the stdout or stderr, when the ssh connection should be silent.
Re: Bad packet length 737686377 at /usr/lib/perl5/site_perl/5.8.8/Net/SSH/Perl/Packet.pm line 175
by salva (Canon) on Jul 29, 2010 at 06:30 UTC