Skip Menu |

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

Report information
The Basics
Id: 4648
Status: resolved
Priority: 0/
Queue: Net-SSH-Perl

People
Owner: Nobody in particular
Requestors: dan [...] midstream.com
Cc:
AdminCc:

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



Subject: lib problem running simple command
Net::SSH::Perl version: 1.24 perl version: 5.005_03 OS: SunOS sun-set 5.8 Generic_108528-13 sun4u sparc SUNW,UltraAX-i2 Installed and tested successfully of all required packages. I'm just doing ssh1 with DES3. Went to run my first test with the following code: ============================================== print "Choose a cipher from the list:\n"; my $supp = Net::SSH::Perl::Cipher::supported(); for my $ciph (sort @$supp) { printf " [%d] %s\n", $ciph, Net::SSH::Perl::Cipher::name($ciph); } printf "Enter a number: [%d] ", Net::SSH::Perl::Cipher::id('IDEA'); chomp(my $c = <STDIN>); print "\n"; my $ssh = Net::SSH::Perl->new($host, port => $port || 'ssh', cipher => Net::SSH::Perl::Cipher::name($c), debug => 1); $ssh->login($user, $pass); print "Enter a command to execute: [ls -l] "; chomp(my $cmd = <STDIN>); my($out, $err) = $ssh->cmd($cmd || "ls -l"); print $out; ============================================== Results follow... What should I do about the error at the end ? ====================================================== Choose a cipher from the list: [2] DES [3] DES3 [5] RC4 Enter a number: [1] 3 sun-set: Reading configuration data /root/.ssh/config sun-set: Reading configuration data /etc/ssh_config sun-set: Allocated local port 1023. sun-set: Connecting to 10.7.100.36, port 22. sun-set: Remote protocol version 1.99, remote software version OpenSSH_2.3.0 sun-set: Net::SSH::Perl Version 1.24, protocol version 1.5. sun-set: No compat match: OpenSSH_2.3.0. sun-set: Connection established. Enter a command to execute: [ls -l] sun-set: Waiting for server public key. sun-set: Received server public key (768 bits) and host key (1024 bits). sun-set: Host '10.7.100.36' is known and matches the host key. sun-set: Encryption type: DES3 sun-set: Sent encrypted session key. sun-set: Received encryption confirmation. class = Net::SSH::Perl::Auth type = RSA lib = Net/SSH/Perl/Auth/RSA.pm class = Net::SSH::Perl::Auth::RSA type = Net::SSH::Perl::SSH1=HASH(0x2976c) lib = Net/SSH/Perl/Auth/Net/SSH/Perl/SSH1=HASH(0x2976c).pm Can't locate Net/SSH/Perl/Auth/Net/SSH/Perl/SSH1=HASH(0x2976c).pm in @INC (@INC contains: /usr/perl5/5.00503/sun4-solaris /usr/perl5/5.00503 /usr/perl5/site_perl/5.005/sun4-solaris /usr/perl5/site_perl/5.005 .) at /usr/perl5/site_perl/5.005/Net/SSH/Perl/Auth.pm line 42. ======================================================
Date: Thu, 11 Dec 2003 19:44:18 -0600 (CST)
From: Dave Rolsky <autarch [...] urth.org>
To: Guest via RT <bug-Net-SSH-Perl [...] rt.cpan.org>
Subject: Re: [cpan #4648] lib problem running simple command
RT-Send-Cc:
On Thu, 11 Dec 2003, Guest via RT wrote: Show quoted text
> Can't locate Net/SSH/Perl/Auth/Net/SSH/Perl/SSH1=HASH(0x2976c).pm in > @INC (@INC contains: /usr/perl5/5.00503/sun4-solaris /usr/perl5/5.00503 > /usr/perl5/site_perl/5.005/sun4-solaris /usr/perl5/site_perl/5.005 .) at > /usr/perl5/site_perl/5.005/Net/SSH/Perl/Auth.pm line 42.
This is almost certainly a bug in the code. I'll have to take a look at it. -dave /*======================= House Absolute Consulting www.houseabsolute.com =======================*/
Looks like part of the problem might have been fixed already but to fix the rest, Net::SSH::Perl::Cipher::supported can take a named 'protocol => $protocol' argument which returns SSH2-only ciphers for 'protocol => 2'. Also changed Net::SSH::Perl::Kex to automatically translate SSH1 cipher names to SSH2 names e.g. DES3 to 3des-cbc. This will make the program attached to this ticket work with the change that supported() must be supported(protocol => 2) (and the 'IDEA' default isn't supported under SSH2 so will fail). Above fix to go into 1.27.