Client - AcceptHostKey


[Client] public void AcceptHostKey(PublicKey publicKey);
[Client] public void AcceptHostKeyBB(string fingerprint);
[Client] public void AcceptHostKeyMd5(string fingerprint);
[Client] public void AcceptHostKeySha256(string fingerprint);


  • publicKey: Host key to accept.
  • fingerprint: Bubble babble, MD5, or SHA-256 fingerprint of host key (public-key) to accept.


While establishing a connection with the SSH server, at progress [ConnectStep]SshKeyExchange, a client must confirm that the presented public key indeed belongs to the intended server. AcceptHostKey allows you to configure one or more host keys that will be accepted. [Client]ClearHostKeyState will undo all previous AcceptHostKey calls.

As an alternative to these methods, you can also implement the [ClientBase]OnHostKey event.