Skip to content

Check host key algorithms before continuing key exchange #1642

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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

Rob-Hague
Copy link
Collaborator

The library currently does not check for matching host key algorithms until needed at the end of the key exchange, in contrast to other algorithm types which are checked beforehand. This leads to confusing or uninformative errors, normally from the server (correctly) closing the connection.

This change moves that check alongside the rest of them, and also improves the error messages that arise from no matching algorithms. For example, the error in #1641 (and probably #1636) is now

Renci.SshNet.Common.SshConnectionException: No matching host key algorithm (server offers ssh-dss)

The library currently does not check for matching host key algorithms until needed
at the end of the key exchange, in contrast to other algorithm types which are checked
beforehand. This leads to confusing or uninformative errors, normally from the server
(correctly) closing the connection.

This change moves that check alongside the rest of them, and also improves the error
messages that arise from no matching algorithms.
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 this pull request may close these issues.

1 participant