<PackageReference Include="SSH.NET" Version="2023.0.1" />

Renci.SshNet.Security.KeyExchange

public abstract class KeyExchange : Algorithm, IKeyExchange, IDisposable
public byte[] ExchangeHash { get; }

protected Session Session { get; }

public byte[] SharedKey { get; protected set; }

protected KeyExchange()

protected abstract byte[] CalculateHash()

protected bool CanTrustHostKey(KeyHostAlgorithm host)

public void Dispose()

protected virtual void Dispose(bool disposing)

public virtual void Finish()

protected abstract byte[] Hash(byte[] hashData)

protected void SendMessage(Message message)

public virtual void Start(Session session, KeyExchangeInitMessage message, bool sendClientInitMessage)

protected abstract bool ValidateExchangeHash()