Repository navigation
Conversation
A common problem when using parameter on systems like Ubuntu or Debian is that the default host key request by the regular SSH client is ecdsa-sha2-nistp256, while Paramiko will ask for ssh-rsa first. This will cause a miss upon the first key lookup and will trigger an "host is not in known_hosts" warning, even though it's present. This patch will check if the host is known first and alter the list of preferred host key types based upon that information before connecting.
|
Thanks. I actually missed that it was somewhat of a known problem. I do hope it's a priority, because as I said above, it seriously compromises the actual security of many systems out there. If I can do more to help, let me know. |
|
Can confirm this is the same issue as #529 ...applying mbr@d516837 mbr@b7f10c7 and mbr@b7fbb8d fixed the issue for me. |
|
Also confirm what j9ac9k commented on 28 Jun. |
|
Being not compatible with command line ssh tools is a big issue for me: That missing functionality prevents me from migrating from mbr/paramiko to paramiko/paramiko. |
|
I just ran into this problem today and it set me back an hour or two. The proposed patch by @mbr looks like it's going down the right path but doesn't appear to take into account non-system known_hosts. |
A common problem when using parameter on systems like Ubuntu or Debian
is that the default host key request by the regular SSH client is
ecdsa-sha2-nistp256, while Paramiko will ask for ssh-rsa first. This will
cause a miss upon the first key lookup and will trigger a "host is not
in known_hosts" warning, even though it's present.
This patch will check if the host is known first and alter the list of
preferred host key types based upon that information before connecting.
I'm not 100% sure everything is in the right place, since I spent most of my time actually tracking down thte issue. However I believe that the current state is a catatrophe! While in theory this should cause affected people to cautiously file bug reports, this is what reality looks like: https://stackoverflow.com/questions/10670217/paramiko-unknown-server - cannot get it working? oh well, better disable host key checking (which is conveniently named "auto add" instead).