Enum SshPrivateKeyFormat
- Namespace
- SshSharp
- Assembly
- SshSharp.dll
A private key file format to write with SaveAsync(string, SshPrivateKeyFormat, string?, CancellationToken).
public enum SshPrivateKeyFormat
Fields
OpenSsh = 0The OpenSSH private key format (
BEGIN OPENSSH PRIVATE KEY), asssh-keygenwrites by default; see ToOpenSshPrivateKey(string?, int). It keeps the comment, and every key type can be encrypted.Pkcs8 = 1PKCS#8 PEM (
BEGIN PRIVATE KEY, orBEGIN ENCRYPTED PRIVATE KEYwith 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 = 2A PuTTY version 3 key file (
.ppk), as PuTTYgen 0.75 and later writes it; see ToPuttyPrivateKey(string?).