Skip Menu |
 

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

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

People
Owner: greg [...] turnstep.com
Requestors: dgehl [...] inverse.ca
Cc:
AdminCc:

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



Subject: RSA1.pm : Argument "ssh-rsa" isn't numeric in numeric eq (==)
Download (untitled) / with headers
text/plain 1.6k
When trying to connect to an SSH v1 server, I obtain Argument "ssh-rsa" isn't numeric in numeric eq (==) at /usr/lib/perl5/vendor_perl/5.8.5/Net/SSH/Perl/Key/RSA1.pm line 97 Here's the test script I used: #!/usr/bin/perl -w use strict; use warnings; use diagnostics; use Data::Dumper; my $host = '192.168.0.45'; my $user = 'myUser'; my $pass = 'ssshhh'; my $cmd = 'show mac-address-table'; use Net::SSH::Perl; my $ssh = Net::SSH::Perl->new($host); $ssh->login($user, $pass); my($stdout, $stderr, $exit) = $ssh->cmd($cmd); print $stdout; exit 1; When modifying the equal sub in Key/RSA1.pm to contain the following sub equal { my($keyA, $keyB) = @_; use Data::Dumper; print Dumper($keyA); print Dumper($keyB); $keyA->{rsa} && $keyB->{rsa} && $keyA->{rsa}{bits} == $keyB->{rsa}{bits} && $keyA->{rsa}{n} == $keyB->{rsa}{n} && $keyA->{rsa}{e} == $keyB->{rsa}{e}; } I obtain the output: $VAR1 = bless( { 'rsa' => { 'e' => bless( do{\(my $o = 140896376)}, 'Math::GMP' ), 'n' => bless( do{\(my $o = 140817992)}, 'Math::GMP' ), 'bits' => 768 } }, 'Net::SSH::Perl::Key::RSA1' ); $VAR1 = bless( { 'rsa' => { 'e' => 'AAAAB3NzaC1yc2EAAAADAQABAAAAYQC4dacqHbcKP2BGUakcmYOESGtBnChwD0t631jtRxWReFAzlXaRtxe8+H02ZPftnsa4l2uqujbG1xdZCSqPIf08JgfJnmtK52RqtYqoxRr5f6PjzuBpDTOr6I0sZzlueL0=', 'n' => undef, 'bits' => 'ssh-rsa' } }, 'Net::SSH::Perl::Key::RSA1' );
From: dgehl [...] inverse.ca
Download (untitled) / with headers
text/plain 942b
This was obtained when trying to connect to a Cisco Catalyst 2960 switch running IOS 12.2(35). When I change the switch configuration to include ip ssh version 2 I obtain with the same test script Uncaught exception from user code: Key class 'Net::SSH::Perl::Key::RSA' is unsupported: Base class package "Class::ErrorHandler" is empty. (Perhaps you need to 'use' the module which defines that package first.) at /usr/lib/perl5/vendor_perl/5.8.5/Convert/PEM.pm line 5 BEGIN failed--compilation aborted at /usr/lib/perl5/vendor_perl/5.8.5/Convert/PEM.pm line 5. Compilation failed in require at /usr/lib/perl5/site_perl/5.8.8/Net/SSH/Perl/Key/RSA.pm line 21. BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.8.8/Net/SSH/Perl/Key/RSA.pm line 21. Compilation failed in require at (eval 24) line 1. BEGIN failed--compilation aborted at (eval 24) line 1. at /usr/lib/perl5/site_perl/5.8.8/Net/SSH/Perl/Key.pm line 14
From: ingo [...] lantschner.name
Download (untitled) / with headers
text/plain 998b
On Di. 27. Feb. 2007, 08:29:58, dominik wrote: Show quoted text
> When trying to connect to an SSH v1 server, I obtain Argument "ssh- > rsa" > isn't numeric in numeric eq (==) at > /usr/lib/perl5/vendor_perl/5.8.5/Net/SSH/Perl/Key/RSA1.pm line 97
I had the same problem when using Net::SSH::Perl connecting to a NetApp Filer. The reason ist, that RSA1.pm (called by SSH1.pm) suports only known_hosts file, in a special format. Due to man sshd two different formats are allowed: Examples closenet,…,130.233.208.41 1024 37 159…93 closenet.hut.fi cvs.openbsd.org,199.185.137.3 ssh-rsa AAAA1234…..= Net::SSH::Perl or RSA1.pm seems not to support the second. Workaround: Disable Host-checking completely by commenting one line in SSH1.pm: $ssh->{session}{id} = $session_id; # disabled von Ingo: $ssh->check_host_key($keys{host}); my $session_key = join ”, map chr rand(255), 1..32; Beware of the security-implications!! Better would be, if the RSA1.pm could handle both forms of known_hosts files.
From: ingo [...] lantschner.name
Download (untitled) / with headers
text/plain 156b
On Mo. 21. Apr. 2008, 09:46:47, IngoLantschner wrote: If you can read German, see here: http://lanti.wordpress.com/2008/04/21/netsshperl-und-known_hosts/
I added support for hashed known_hosts files in 1.33


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.