Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing Key exchange method in SSH.NET

The webpage (https://github.com/sshnet/SSH.NET/) says it supports several Key Exchange Methods:

SSH.NET supports the following key exchange methods:

  • diffie-hellman-group-exchange-sha256
  • diffie-hellman-group-exchange-sha1
  • diffie-hellman-group14-sha1
  • diffie-hellman-group1-sha1

But there is absolutely no documentation on how to use one of these, DH_GROUP_EXCHANGE_SHA256, for example.

Has anyone done this? Can you give me some direction here?

Thanks. Aaron

like image 962
FunkMonkey33 Avatar asked Apr 30 '26 03:04

FunkMonkey33


1 Answers

ConnectionInfo has KeyExchangeAlgorithms, which defines list of algorithms the SSH.NET will offer to the server.

The client and the server should pick the best algorithm supported by both sides. But it seems to me that, as Dictionary does not have a deterministic order, SSH.NET might not honor the order.

Though in general, if "diffie-hellman-group-exchange-sha256" is not picked, I'd rather suspect the server not to support it.

like image 53
Martin Prikryl Avatar answered May 02 '26 18:05

Martin Prikryl