Skip to content

FIPS - cannot use MD5 #396

Open
Open

Description

@cingeyedog

Activity

  1. jan-matejka commented on Jan 27, 2015

    @jan-matejka
    ssh -vvv <host-working-with-paramiko>
    debug1: kex: server->client aes128-ctr [email protected] none
    
    ssh -vvv <fips-enabled-host-not-working-with-paramiko>
    debug1: kex: server->client aes128-ctr hmac-sha1 none
    

    So I guess, exactly what the OP says

  2. Ismael commented on Nov 10, 2017

    @Ismael
  3. mayli commented on Apr 24, 2018

    @mayli

    Any update on this PR?

  4. dsethi commented on Apr 21, 2020

    @dsethi

    Has this issue been solved? We are running into same issue where we have to use paramiko on a fips enabled kernel. In case not, are there alternate python ssh libraries for this?

  5. thukk commented on May 20, 2020

    @thukk

    This pull request fixes this: #1103
    To install run:

    pip install -e git+https://github.com/ioparaskev/paramiko#egg=paramiko

    this does indeed allow Paramiko to work on FIPS enabled machines. There is a CryptographyDeprecationWarning for ecdsakey.py and kex_ecdh_nist.py. It recommends using EllipticCurvePublicKey instead of EllipticCurvePublicNumbers.

  6. dsethi commented on May 20, 2020

    @dsethi

    Thanks for that Thukk. Since the PR is not merged/failed some tests initially, did it lead to any issues? How long have you run this change?

  7. thukk commented on May 20, 2020

    @thukk

    Thanks for that Thukk. Since the PR is not merged/failed some tests initially, did it lead to any issues? How long have you run this change?

    Thus far, no. Set it up today. I am using Paramiko as a part of Fabric. My Fabric scripts are now working (aside from the warning I mentioned before).

  8. avidspartan1 commented on Jul 10, 2020

    @avidspartan1

    We've found the paramiko transport to work well for us, except when it comes to FIPS. Would love to see this PR accepted.

  9. subodh2691 commented on Jul 18, 2020

    @subodh2691

    I am facing similar issue and cloning of repo outside org is blocked in my machine. When this change will be going to latest version of paramiko?

  10. naman0805 commented on Oct 21, 2020

    @naman0805

    Any updates on whether this change ( #1103 ) is going to get merged in the master branch?
    If Yes, do we have any tentative timelines?

  11. neutronscott commented on Nov 20, 2020

    @neutronscott

    While waiting on that PR I guess I can do this with pkey.py to use paramiko if anyone else needs it:

      return md5(self.asbytes()).digest()
    
      return md5(self.asbytes(), usedforsecurity=False).digest()
    
  12. 14 remaining items

  13. bkyarnell commented on Oct 18, 2024

    @bkyarnell

    @storyG
    Thanks for that!

    I'm using netmiko for network management and netmiko has paramiko as a dependency. Adding this to the top of my code after my imports allows SHA-256 vs. MD5 to be used for use with the ssh transport.

    #Patch to allow paramiko to use SHA-256 vs MD5
    import paramiko
    from hashlib import sha256
    paramiko.PKey.get_fingerprint = lambda x: sha256(x.asbytes()).digest()
    

    Hopefully, this can be fixed in a future iteration of paramiko to allow the encryption hash to be selected.

  14. added a commit that references this issue on Nov 26, 2024
  15. added a commit that references this issue on Feb 3, 2026
  16. see-quick commented on Aug 20, 2026

    @see-quick

    Hello, guys any reason to not adopt a solution using SHA-256 instead of MD5?

    ^^ @bitprophet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions