Table of Contents

Class SshHostKey

Namespace
SshSharp
Assembly
SshSharp.dll

The host key the server proved possession of during key exchange. Decide whether to trust it in HostKeyVerifier.

public sealed record SshHostKey : IEquatable<SshHostKey>
Inheritance
SshHostKey
Implements
Inherited Members

Constructors

SshHostKey(string, string, string, ReadOnlyMemory<byte>, int)

The host key the server proved possession of during key exchange. Decide whether to trust it in HostKeyVerifier.

Properties

Algorithm

The negotiated signature algorithm, for example rsa-sha2-512.

Certificate

The host certificate, when the server presented one (an OpenSSH -cert-v01@openssh.com host key). The other members then describe the certified key, which is what a plain known_hosts entry or a pinned fingerprint refers to.

Fingerprint

The OpenSSH-style SHA-256 fingerprint (SHA256:...).

KeySizeBits

The key size in bits.

KeyType

The key type, for example ssh-rsa.

PublicKey

The public key in SSH wire format, as stored in known_hosts after base64 decoding.

Methods

Equals(SshHostKey?)

Equal when they describe the same key: the key bytes are compared, not the buffers that hold them.

GetHashCode()

Serves as the default hash function.