SshPrivateKey Class
Namespace: Rebex.Net
Assembly: Rebex.Networking.dll (version 7.0.9147)
Represents SSH private key (RSA, DSA, EcDSA, EdDSA, certificate-based). Private key data also includes the public key.
Syntax
public class SshPrivateKey : SshPublicKey
Inherited Members
Constructors
Name | Description |
---|---|
Ssh |
Creates a certificate-based SSH key for use with SSH/SFTP servers that support X.509 certificate authentication. |
Ssh |
Creates a certificate-based SSH key for use with SSH/SFTP client that support X.509 certificate authentication. |
Ssh |
Creates an SSH private key based on the specified Asymmetric |
Ssh |
Loads a private key in PKCS #8, PuTTY, OpenSSH or SSLeay-format from the specified raw data. |
Ssh |
Loads a private key in PKCS #8, PuTTY, OpenSSH or SSLeay-format from the specified stream. |
Ssh |
Creates an SSH private key based on the specified Asymmetric |
Ssh |
Loads a private key in PKCS #8, PuTTY, OpenSSH or SSLeay-format from the specified path. |
Properties
Name | Description |
---|---|
Certificate | Gets a certificate of a certificate-based SSH key. |
Comment | Gets or sets the key comment. The comment is used while saving in some formats.
Inherited from Ssh |
Fingerprint | Gets the public key fingerprint.
Inherited from Ssh |
Key |
Gets the key algorithm.
Inherited from Ssh |
Key |
Gets the key algorithm ID
Inherited from Ssh |
Key |
Gets the key size, in bits.
Inherited from Ssh |
Methods
Name | Description |
---|---|
Create |
Creates an SSH private key from the specified private key info object. |
Create |
Creates an SSH private key from the specified DSA parameters. |
Create |
Creates an SSH private key from the specified RSA parameters. |
Equals(Ssh |
Determines whether the specified key is the same key as the specified key.
Inherited from Ssh |
Equals(Object) | Determines whether the specified object is the same key as the specified key.
Inherited from Ssh |
Generate() | Generates an SSH private key using the RSA algorithm with a key size of 1024. |
Generate(Ssh |
Generates an SSH private key using the specified algorithm and a default key size. |
Generate(Ssh |
Generates an SSH private key using the specified algorithm and key size. |
Get |
Returns the underlying X509 certificate.
Inherited from Ssh |
Get |
Returns the underlying X509 certificate and its chain (for certificate-based keys).
Inherited from Ssh |
Get |
Gets the DSA parameters for a DSA key. May only be used for DSA private keys. |
Get |
A hash function for this type.
Inherited from Ssh |
Get |
Gets the raw form of the private key. |
Get |
Returns the private key info for this key. |
Get |
Gets the public key in SSH format (or raw X.509 data of the leaf certificate).
Inherited from Ssh |
Get |
Returns the public key info for this key.
Inherited from Ssh |
Get |
Gets the RSA parameters for a RSA key. May only be used for RSA private keys. |
Load |
Loads public keys in ~/.ssh/authorized_keys file format.
Inherited from Ssh |
Load |
Loads public keys in ~/.ssh/authorized_keys file format.
Inherited from Ssh |
Parse(String) | Parses a single SSH public key in ~/.ssh/authorized_keys format.
Inherited from Ssh |
Save(Stream, String, Ssh |
Saves the private key into the supplied stream in the specified format. |
Save(String, String, Ssh |
Saves the private key into the supplied stream in the specified format. |
Save |
Saves the public key into the supplied stream in Base64-encoded SSH2 public key format.
Inherited from Ssh |
Save |
Saves the public key into the supplied stream in the specified format.
Inherited from Ssh |
Save |
Saves the public key into the supplied stream in Base64-encoded SSH2 public key format.
Inherited from Ssh |
Save |
Saves the public key into the supplied stream in the specified format.
Inherited from Ssh |