Table of Contents

Constructor SshCertificateBuilder

Namespace
SshSharp
Assembly
SshSharp.dll

SshCertificateBuilder(SshPublicKey, SshCertificateType, string)

Creates a builder for a certificate of type for publicKey.

public SshCertificateBuilder(SshPublicKey publicKey, SshCertificateType type, string keyId)

Parameters

publicKey SshPublicKey

The key to certify: Ed25519, ECDSA (nistp256/384/521) or RSA (2048 bits or more). Its comment becomes the certificate's Comment.

type SshCertificateType

A user certificate, for logging in, or a host certificate, for a server.

keyId string

The key identifier (ssh-keygen -I): sshd logs it when the certificate is used, so make it say who or what the certificate is for, for example ci-build-1234.

Exceptions

ArgumentException

The key is of a type certificates are not issued for here (a FIDO security key), an RSA key under 2048 bits, or the key identifier is empty or holds a control character.