<PackageReference Include="SSH.NET" Version="2024.1.0" />

PrivateKeyFile

Represents private key information.

Gets the supported host algorithms for this key file.

public Key Key { get; }

Gets the key.

public PrivateKeyFile(Key key)

Initializes a new instance of the PrivateKeyFile class.

public PrivateKeyFile(Stream privateKey)

Initializes a new instance of the PrivateKeyFile class.

public PrivateKeyFile(string fileName)

Initializes a new instance of the PrivateKeyFile class.

public PrivateKeyFile(string fileName, string passPhrase)

Initializes a new instance of the PrivateKeyFile class.

public PrivateKeyFile(Stream privateKey, string passPhrase)

Initializes a new instance of the PrivateKeyFile class.

public void Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

protected virtual void Dispose(bool disposing)

Releases unmanaged and - optionally - managed resources.