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 algorithm negotiation failed #1141

Closed
iamprashantkumar86 opened this issue Jun 9, 2023 · 3 comments
Closed

Host key algorithm negotiation failed #1141

iamprashantkumar86 opened this issue Jun 9, 2023 · 3 comments
Milestone

Comments

@iamprashantkumar86
Copy link

Recently our remote client has upgraded their tectia server due to which the SFTP process started failing with below error:

The connection was closed by the server: Host key algorithm negotiation failed. Client algorithms are ssh-rsa,ssh-dss, server rsa-sha2-256,rsa-sha2-512,ssh-rsa-sha256@ssh.com. (KeyExchangeFailed).

We also upgraded SSHNet assembly to latest version 2021.10.1.0 but it didnt seem to work.
But when tried to connect with tectia client or cmd, we were able to connect successfully. After doing a bit of digging we came to know that tectia client is using Hostkeyalgorithm - ssh-rsa-sha256@ssh.com while establishing connection.
I did a lot of research on how to use/force the same alogrithm through code but wasnt successful.

Request you to provide a bit of guidance here.

@ckdell
Copy link

ckdell commented Jun 27, 2023

Can you manually add ssh-rsa-sha256 to the KeyAlgorithms in your ConnectionInfo ?

@WojciechNagorski
Copy link
Collaborator

Fixed by #1177 and #1180

@WojciechNagorski
Copy link
Collaborator

Version 2023.0.0 has been published https://www.nuget.org/packages/SSH.NET/2023.0.0

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

No branches or pull requests

3 participants