0 votes
by (120 points)

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' ?

Applies to: Rebex SFTP

1 Answer

0 votes
by (147k points)

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.