ParallelSSH / ssh2-python

Python bindings for libssh2 C library.
https://parallel-ssh.org
GNU Lesser General Public License v2.1
228 stars 72 forks source link

[Feature] Add missing host key hash types #137

Closed pkittenis closed 3 years ago

pkittenis commented 3 years ago

LIBSSH2_HOSTKEY_HASH_SHA256 is missing from ssh2.session, possibly other hash types.

pkittenis commented 3 years ago

Resolved by #138

radha-wadhera commented 3 years ago

Thanks for considering this change. I am trying to upgrade the ssh2-python but I am still not able to get SHA 256

Version installed on my system ssh2-python==0.25.0

I am getting the following error exception module 'ssh2.session' has no attribute 'LIBSSH2_HOSTKEY_HASH_SHA256'

I even tried with version 0.24.0. But no luck! Can you please help me out with this?

radha-wadhera commented 3 years ago

I missed telling that I am still getting the error of missing attribute when I am trying to use the following API

nodekey_hash = _session.hostkeyhash(ssh2.session.LIBSSH2_HOSTKEY_HASH_SHA256)  The version installed on my system ssh2-python==0.25.0

I am getting the following error exception module 'ssh2.session' has no attribute 'LIBSSH2_HOSTKEY_HASH_SHA256'

Can you please help me out with this?

pkittenis commented 3 years ago

from ssh2.session import LIBSSH2_HOSTKEY_HASH_SHA256 works.

Please raise a new issue with steps to reproduce if there is an issue with the library. This issue is closed.