Class SshCredentials
Provides credentials suitable for connecting to a server machine via SSH.
Namespace: Neon.SSH
Assembly: Neon.SSH.dll
Syntax
public class SshCredentials
Properties
None
Returns an instance indicating that there are no available credentials.
Declaration
public static SshCredentials None { get; }
Property Value
Type | Description |
---|---|
SshCredentials | The credentials. |
Username
Returns the user name.
Declaration
public string Username { get; }
Property Value
Type | Description |
---|---|
string |
Methods
FromPrivateKey(string, string, string)
Returns credentials based on a user name and password and an optional passphrase.
Declaration
public static SshCredentials FromPrivateKey(string username, string privateKey, string passPhrase = null)
Parameters
Type | Name | Description |
---|---|---|
string | username | The user name. |
string | privateKey | The unencrypted PEM-encoded private key. |
string | passPhrase | Optionally specifies a pass phrase. |
Returns
Type | Description |
---|---|
SshCredentials | The SshCredentials. |
FromUserPassword(string, string)
Returns credentials based on a user name and password.
Declaration
public static SshCredentials FromUserPassword(string username, string password)
Parameters
Type | Name | Description |
---|---|---|
string | username | The user name. |
string | password | The password. |
Returns
Type | Description |
---|---|
SshCredentials | The SshCredentials. |