You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you're connecting as a client, which SSH server are you connecting to?
No response
If you're using paramiko as part of another tool, which tool/version?
No response
Expected/desired behavior
When adding an existing host key using HostKeys.add(), the method should replace the existing entry with the new key instead of creating a duplicate entry. This only happens when hostname is a hash instead of direct hostname
e.g. |1|bWQqxa0HhZfj+3UAZfCvBYFsE8U=|RkKbwD+FTzftt4HkaaFY+SHJqn7=
Actual behavior
Instead of overriding the existing entry, the HostKeys.add() method duplicates the entry, resulting in multiple entries for the same hostname-key pair. This only happens when hostname is a hash instead of direct hostname
e.g. |1|bWQqxa0HhZfj+3UAZfCvBYFsE8U=|RkKbwD+FTzftt4HkaaFY+SHJqn7=
How to reproduce
Use the HostKeys.add() method to add a host key for a specific hostname (which is present in ~/.ssh/known_hosts with hash)
Repeat the above step with the same hostname but a different key.
Verify the contents of the HostKeys object.
This is my scenario:
Was adding the following key:
ecdsa-sha2-nistp256
AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzd --skipped-- +zt/6DTB45+Q/oPiRvRs4l4ZqCm+/Shk=
after adding got the old key twice:
Feb 09 13:54:54: INFO : ecdsa-sha2-nistp256
Feb 09 13:54:54 : INFO : AAAAE2VjZHNhLXNoYTItbmlzdHA --skipped-- C/3Po+kRAWGNogj8pcQLJZMw=
Feb 09 13:54:54 : INFO : ecdsa-sha2-nistp256
Feb 09 13:54:54 : INFO : AAAAE2VjZHNhLXNoYTItbmlzdHA --skipped-- C/3Po+kRAWGNogj8pcQLJZMw=
Anything else?
No response
The text was updated successfully, but these errors were encountered:
Are you using paramiko as a client or server?
Client
What feature(s) aren't working right?
known_hosts
What version(s) of paramiko are you using?
3.0.0
What version(s) of Python are you using?
3.8.10
What operating system and version are you using?
Ubuntu 20.04.6 LTS
If you're connecting as a client, which SSH server are you connecting to?
No response
If you're using paramiko as part of another tool, which tool/version?
No response
Expected/desired behavior
When adding an existing host key using HostKeys.add(), the method should replace the existing entry with the new key instead of creating a duplicate entry. This only happens when hostname is a hash instead of direct hostname
e.g. |1|bWQqxa0HhZfj+3UAZfCvBYFsE8U=|RkKbwD+FTzftt4HkaaFY+SHJqn7=
Actual behavior
Instead of overriding the existing entry, the HostKeys.add() method duplicates the entry, resulting in multiple entries for the same hostname-key pair. This only happens when hostname is a hash instead of direct hostname
e.g. |1|bWQqxa0HhZfj+3UAZfCvBYFsE8U=|RkKbwD+FTzftt4HkaaFY+SHJqn7=
How to reproduce
Use the HostKeys.add() method to add a host key for a specific hostname (which is present in ~/.ssh/known_hosts with hash)
Repeat the above step with the same hostname but a different key.
Verify the contents of the HostKeys object.
This is my scenario:
Was adding the following key:
ecdsa-sha2-nistp256
AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzd --skipped-- +zt/6DTB45+Q/oPiRvRs4l4ZqCm+/Shk=
after adding got the old key twice:
Feb 09 13:54:54: INFO : ecdsa-sha2-nistp256
Feb 09 13:54:54 : INFO : AAAAE2VjZHNhLXNoYTItbmlzdHA --skipped-- C/3Po+kRAWGNogj8pcQLJZMw=
Feb 09 13:54:54 : INFO : ecdsa-sha2-nistp256
Feb 09 13:54:54 : INFO : AAAAE2VjZHNhLXNoYTItbmlzdHA --skipped-- C/3Po+kRAWGNogj8pcQLJZMw=
Anything else?
No response
The text was updated successfully, but these errors were encountered: