Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

HMAC_MD5 with Net::SSH::Perl

by UpTide (Novice)
on May 19, 2017 at 20:04 UTC ( [id://1190670]=perlquestion: print w/replies, xml ) Need Help??

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

On the main CPAN page http://search.cpan.org/~schwigon/Net-SSH-Perl/lib/Net/SSH/Perl.pm it says, and I quote "The deprecated hmac-sha1 or hmac-md5 algorithms are available but not enabled by default."
Then It ends there. It does not say anything about how to enable sha1 or md5... I've been at this for hours trying to get it to use md5. I cannot use another SSH mac.
The only thing I've found was Net::SSH::Perl::Mac, which just says it is implemented with Digest::HMAC_MD5, which just says 'This module provide HMAC-MD5 hashing.'
I'm completely lost and very frustrated.


EDIT: I found it finally. Example is as follows Net::SSH::Perl->new($serverHostname, debug => 1, options => ['MACs +hmac-sha1']) I was able to find this via the github page https://github.com/lkinley/Net-SSH-Perl found as the vague language "One can enable via the "MACs" option. For example: 'MACs +hmac-sha1'".
I pray for those that have to also walk this path. Good luck.

Replies are listed 'Best First'.
Re: HMAC_MD5 with Net::SSH::Perl
by Corion (Patriarch) on May 19, 2017 at 20:19 UTC

    Have you tried explicitly specifying your intended cipher when constructing the Net::SSH::Perl object?

    my $ssh = Net::SSH::Perl->new( cipher => 'hmac-md5', );

    I interpret the documentation in the way that unless instructed to, the module will not use a weak cipher.

      I had tried that, it did not change the macs listed under the client. I added the solution to my question because I just found it.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1190670]
Approved by Corion
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2024-04-23 07:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found