Table of Contents

Method Parse

Namespace
SshSharp
Assembly
SshSharp.dll

Parse(string, string?)

Parses a private key.

public static SshPrivateKey Parse(string text, string? passphrase = null)

Parameters

text string

The key file's contents.

passphrase string

The passphrase of an encrypted key; ignored for unencrypted keys.

Returns

SshPrivateKey

Exceptions

FormatException

The text is not a supported private key, or the passphrase is wrong or missing.