<PackageReference Include="SSH.NET" Version="2014.4.6-beta1" />

PrivateKeyFile

public class PrivateKeyFile : IDisposable
Represents private key information
public HostAlgorithm HostKey { get; }

Gets the host key.

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 ResourceMessages.

protected virtual void Dispose(bool disposing)

Releases unmanaged and - optionally - managed resources