Table of Contents

Enum SshPrivateKeyFormat

Namespace
SshSharp
Assembly
SshSharp.dll
public enum SshPrivateKeyFormat

Fields

OpenSsh = 0

The OpenSSH private key format (BEGIN OPENSSH PRIVATE KEY), as ssh-keygen writes by default; see ToOpenSshPrivateKey(string?, int). It keeps the comment, and every key type can be encrypted.

Pkcs8 = 1

PKCS#8 PEM (BEGIN PRIVATE KEY, or BEGIN ENCRYPTED PRIVATE KEY with a passphrase), which OpenSSL and the .NET cryptography APIs read; see ToPkcs8PrivateKey(string?). It has no comment, and an Ed25519 key cannot be encrypted.

Putty = 2

A PuTTY version 3 key file (.ppk), as PuTTYgen 0.75 and later writes it; see ToPuttyPrivateKey(string?).