Initializes a new instance of the SshClient class.
Namespace: Renci.SshNetAssembly: Renci.SshNet (in Renci.SshNet.dll) Version: 0.1.0.0 (1.0.0.0)
Syntax
Parameters
- host
- Type:
System String
Connection host.
- username
- Type:
System String
Authentication username.
- password
- Type:
System String
Authentication password.
Exceptions
| Exception | Condition |
|---|---|
| password is null. | |
| host is invalid, or username is null or contains whitespace characters. |
Examples
using (var client = new SshClient(host, username, password)) { client.Connect(); // Do something here client.Disconnect(); }
See Also