Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

HMAC_MD5 with Net::SSH::Perl

by UpTide (Novice)
on May 19, 2017 at 20:04 UTC ( #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 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 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 (Pope) 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?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1190670]
Approved by Corion
Front-paged by Corion
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (11)
As of 2017-05-25 17:39 GMT
Find Nodes?
    Voting Booth?