Table of Contents

Method FromSigner

Namespace
SshSharp
Assembly
SshSharp.dll

FromSigner(SshKeySigner, string?)

A key that signs through signer: one in a key vault, a KMS, an HSM or on a smart card. Usable wherever a key is: PrivateKeys, WithCertificate(SshCertificate), SshSignature. Each signature is checked against the public key before it is used.

public static SshPrivateKey FromSigner(SshKeySigner signer, string? comment = null)

Parameters

signer SshKeySigner

The signer. It stays the caller's: disposing the returned key does nothing to it.

comment string

A comment for the key, often user@host.

Returns

SshPrivateKey

Remarks

The returned key cannot be exported or added to an agent.

Exceptions

ArgumentException

The signer's SignatureAlgorithms include one its key type cannot use.