ParallelSSH / ssh2-python

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

ssh2-python is unable to establish connection with RHEL 9 SSHD #176

Closed ogajduse closed 2 years ago

ogajduse commented 2 years ago

Bug reports

Steps to reproduce:

  1. Run the ssh2-python example python publickey_fromfile.py --host 10.1.5.60 -u root /home/.ssh/id_rsa_foreman_proxy ls against RHEL 9 system
  2. client side: ssh2.exceptions.AuthenticationError, server side: sshd[7101]: userauth_pubkey: key type ssh-rsa not in PubkeyAcceptedAlgorithms [preauth]

Expected behaviour: Client connects to the host, and runs ls.

Actual behaviour: AuthenticationError was thrown

Additional info: Versions: ssh2-python 0.27.0, Fedora 36, Python 3.10.5

I can not see this issue when using the CLI OpenSSH client. Also, I can not see it when using the publickey_fromfile.py and ed25519 key type. And the issue does not pop up even when using another example: python password_auth.py --host 10.1.5.60 -u root mysecretpass ls

Logs: https://gist.github.com/ogajduse/fce8da7f0131be623fe866df9b67e5e0

ogajduse commented 2 years ago

Is this issue related to https://github.com/libssh2/libssh2/issues/634?

pkittenis commented 2 years ago

Hi there,

Thanks for the interest and report.

Is this issue related to https://github.com/libssh2/libssh2/issues/634?

It is, and has been resolved by 1.0.0 release.