The full error message is:
Negotiation failed. The client and the server have no common key exchange algorithm. Server supports 'diffie-hellman-group1-sha1' which is weak and not enabled at the client.
How do I enable 'diffie-hellman-group1-sha1' ?
This legacy algorithm can be enabled using Sftp object's Settings.SshParameters.KeyExchangeAlgorithms property:
var client = new Sftp();
client.Settings.SshParameters.KeyExchangeAlgorithms |= SshKeyExchangeAlgorithm.DiffieHellmanGroup1SHA1;
For additional information, see SSH ciphers and Setting connection options.
Also, please be aware that the diffie-hellman-group1-sha1 cipher is not secure.
Welcome to Q&A forum for C# and VB.NET developers working with following .NET components:
If you need immediate assistance, please contact us directly.