Description
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.