Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Host key checking is lazy #301

Closed
spoutn1k opened this issue Jun 7, 2024 · 0 comments · Fixed by #302
Closed

Host key checking is lazy #301

spoutn1k opened this issue Jun 7, 2024 · 0 comments · Fixed by #302

Comments

@spoutn1k
Copy link
Contributor

spoutn1k commented Jun 7, 2024

Hello,

I am facing an issue when connecting with russh to a host I previously connected to with the system ssh.

The system ssh will leave the known host file in this state upon first connection:

host ssh-ed25519 AAAAC3NzaC1...
host ssh-rsa AAAAB3NzaC1...
host ecdsa-sha2-nistp256 AAAAE2VjZH...

Turns out check_known_hosts does not like this very much and will error out with russh_keys::Error::KeyChanged if the ecdsa-sha2-nistp256 key is not first. I imagine it does not look past the first hostname match, yet this is not how OpenSSH_9.7p1, OpenSSL 3.3.1 4 Jun 2024 leaves the keys ...

Upon confirmation that this is not intended behaviour I'll submit a PR. Thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant