briandfoy / net-ssh-perl

Development on the Net::SSH::Perl module to support latest ciphers, key exchange mechanisms, etc.
Other
4 stars 1 forks source link

ssh options not implemented in 1.36 #44

Open briandfoy opened 1 year ago

briandfoy commented 1 year ago

This ticket was imported from rt.cpan.org 91840

Folks,

We are working on the 1.36 version of the module and it is not passing StrictHostKeyChecking so ssh is failing for a virtual host that answers to multiple IP as the first one we connect to puts it's key in known_hosts and the other fails.

Here is how we are calling it:

my $ssh=Net::SSH::Perl->new($userHost,options=>["StrictHostKeyCheckingno","ConnectTimeout 30","BatchMode yes"]);
$ssh->login($user,"1");

my ($so,$si,$se)=$ssh->cmd('hostname');
print "$so\n";

Keith Clay

briandfoy commented 1 year ago

from schwigon@cpan.org


Having a look. Looks like I only have to add the missing options to %DIRECTIVES in Net/SSH/Perl/Config.pm. If anybody knows better, feel free to chime in while I dive into the code...

Steffen

briandfoy commented 1 year ago

from schwigon@cpan.org


Keith,

can you confirm your error message looks similar to this:

Host key for 'vserver' has changed! at blib/lib//Net/SSH/Perl/Kex/DH1.pm line 49.

?

Thanks, Steffen

briandfoy commented 1 year ago

from kc2105@att.com


Steffen,

Let me setup a test again and get you the error.

briandfoy commented 1 year ago

from kc2105@att.com


Steffan,

Here is our error.

our_host: Remote protocol version 2.0, remote software version OpenSSH_5.3
our_host: Net::SSH::Perl Version 1.36, protocol version 2.0.
Host key for 'our_remote_host' has changed! At perl/lib/5.8.8/Net/SSH/Perl/Kex/DH1.pm line 49
briandfoy commented 1 year ago

from schwigon@cpan.org


Keith,

please try whether Net::SSH::Perl v1.37 solves your problem. The code already existed, I only had to enable and map the option.

Kind regards, Steffen

briandfoy commented 1 year ago

from kc2105@att.com


Steffen,

We are installing today and will test the changes and let you know our results. Thanks!