Method LoadAsync
- Namespace
- SshSharp
- Assembly
- SshSharp.dll
LoadAsync(string, string?, CancellationToken)
Reads and parses a private key file.
public static Task<SshPrivateKey> LoadAsync(string path, string? passphrase = null, CancellationToken cancellationToken = default)
Parameters
pathstringpassphrasestringcancellationTokenCancellationToken
Returns
Exceptions
- FormatException
The text is not a supported private key, or the passphrase is wrong or missing.