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

Can't locate loadable object for module Crypt::OpenSSH::ChachaPoly in @INC #56

Open briandfoy opened 1 year ago

briandfoy commented 1 year ago

This ticket was imported from rt.cpan.org 117272

Hi.

There is already a ticket on this, Id: 115382 but I wanted to post additional information that might be of help and I could not find any way to append to the existing ticket.

After just upgrading software on my machine that forced an upgrade to Perl and p5-Net-SSH-Perl, I am suddenly getting this error. I even tried going back to the previous versions of Perl and of p5-Net-SSH-Perl but the bug was still there.

OS: FreeBSD 10.2 Release Perl version: 5.20.3 p5-Net-SSH-Perl version: 2.01

The full error is

Can't locate loadable object for module Crypt::OpenSSH::ChachaPoly in @INC (@INC contains: /usr/local/lib/perl5/site_perl/mach/5.20 /usr/local/lib/perl5/site_perl /usr/local/lib/perl5/5.20/mach /usr/local/lib/perl5/5.20 /usr/local/lib/perl5/site_perl/5.20 /usr/local/lib/perl5/site_perl/5.20/mach .) at /usr/local/lib/perl5/site_perl/mach/5.20/Net/SSH/Perl/Cipher/ChachaPoly.pm line 14. Compilation failed in require at /usr/local/lib/perl5/site_perl/mach/5.20/Net/SSH/Perl/Cipher.pm line 57.

I finally found a work around. In my code, prior to calling

$site->{ssh} = Net::SSH::Perl->new($site->{host}, %params);

I set

$params{cipher} = "arcfour";

and it worked. I tried setting the cipher to each of "blowfish-cbc" and "3des-cbc", which the docs say is the default, but when I did, I got this different error.

    FATAL: key must be string scalar at
    /usr/local/lib/perl5/site_perl/mach/5.20/Crypt/Cipher.pm line 43.
briandfoy commented 1 year ago

from schwigon@cpan.org


Thanks for your information. I hope someone else can pick it up as I am currently unable to work on that. Sorry.

Kind regards, Steffen

briandfoy commented 1 year ago

from schwigon@cpan.org


Is there any chance you can try your work-around against lkinley's repository on github? He is currently doing the actual work on this lib. And I plan to release his latest version to CPAN soon.

If you could send him a pull request this would help me because I am actually only maintaining the CPAN release but do not know about the internals.

His repository is https://github.com/lkinley/Net-SSH-Perl and I will merge from there at some point.

Thanks and kind regards, Steffen

briandfoy commented 1 year ago

from vince.perl@hightek.org


Hi Steffen.

I'm not clear what you mean by send him a pull request. I did download the zip file of the master branch snapshot. It errors out though when I run "make test" as the README says to do.

Test Summary Report
-------------------
t/05-cipher.t    (Wstat: 65280 Tests: 16 Failed: 0)
  Non-zero exit status: 255
    Parse errors: Bad plan.  You planned 84 tests but ran 16.
    Files=13, Tests=77,  2 wallclock secs ( 0.06 usr  0.02 sys
    +  0.78 cusr  0.16 csys =  1.02 CPU)
    Result: FAIL
    Failed 1/13 test programs. 0/77 subtests failed.
    *** Error code 255

Are you wanting me to go ahead and install and test it anyway? Also, you asked me to try my work-around. Are you not wanting to see if it works without the work around of setting

$params{cipher} = "arcfour";

or are you only wanting to try it with the work around at this time for some reason? Because just testing the work around will not reveal if the original problem still exists.

briandfoy commented 1 year ago

from schwigon@cpan.org


I might have confused what you reported. Anyway, to sort out this ticket and other similar ones I just created

https://github.com/lkinley/Net-SSH-Perl/issues/5

on lkinley's github repository because he is doing his current work there. Feel free to watch progress there or follow up on questions.

Thanks for your report.

Kind regards, Steffen

briandfoy commented 1 year ago

from schwigon@cpan.org


Hi,

is this still an issue with the v2.12 that I just uploaded to CPAN?

Kind regards, Steffen

briandfoy commented 1 year ago

from vince.perl@hightek.org


Hi Steffen.

Sorry, I'm not in a position to test it right now. After upgrading to FreeBSD 10.3 a while back, it completely broke with the newer version of Perl. I was using p5-Net-SSH-Perl-2.09.01. I was getting "No matching cipher found: ..." errors. Even using the "arcfour" cipher, which is what I was using as the only cipher that worked before.

I already ended up changing all my code out to use the Net::OpenSSH module instead, to get everything back working.