Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

ssh: Include rsa-sha2-256 and rsa-sha2-512 in the list of hostkey types#6938

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
ethomson merged 1 commit intolibgit2:mainfrommathworks:lrm29-ssh-hostkey-check
Nov 26, 2024

Conversation

lrm29
Copy link
Contributor

User sees this error when trying to clone a repository using SSH:

failed to start SSH session: Unable to exchange encryption keys (-1x23)

This particular server only accepts these host key algorithms (output from ssh executable):

debug2: host key algorithms: rsa-sha2-256,rsa-sha2-512

"Normally" you might see others but what causes the error is the absence of "ssh-rsa" from the accepted list of host key algorithms.

Calling libssh2_session_method_pref with a list of methodsunfortunately isn't just preferring those methods, it means it accepts ONLY those methods. This pull request fixes that by adding rsa-sha2-256 and rsa-sha2-512 to the list.

This could be optimised by only calling libssh2_knownhost_checkp once for LIBSSH2_KNOWNHOST_KEY_SSHRSA and appending all of rsa-sha2-256, rsa-sha2-512. and ssh-rsa if mismatch is returned.

@ethomsonethomson merged commitc86842f intolibgit2:mainNov 26, 2024
19 checks passed
@ethomson
Copy link
Member

Thanks!

@lrm29lrm29 deleted the lrm29-ssh-hostkey-check branchDecember 12, 2024 22:31
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@lrm29@ethomson

[8]ページ先頭

©2009-2025 Movatter.jp