Method Pinned
- Namespace
- SshSharp
- Assembly
- SshSharp.dll
Pinned(params string[])
Trusts only keys with one of these OpenSSH SHA-256 fingerprints (SHA256:..., as ssh-keygen -lf prints).
public static SshHostKeyVerifier Pinned(params string[] fingerprints)
Parameters
fingerprintsstring[]
Returns
Pinned(params SshPublicKey[])
Trusts only these keys: the server's key must be one of them, byte for byte (for a host certificate, the certified key). Read
them with Parse(string) from the server's /etc/ssh/ssh_host_*_key.pub files.
public static SshHostKeyVerifier Pinned(params SshPublicKey[] keys)
Parameters
keysSshPublicKey[]
Returns
Exceptions
- ArgumentException
No key was given, or a key is null.