Initializes a new instance of the PasswordConnectionInfo 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
Connection username.
- password
- Type:
System String
Connection password.
Exceptions
| Exception | Condition |
|---|---|
| password is null. | |
| host is invalid, or username is null or contains whitespace characters. | |
| port is not within |
Examples
var connectionInfo = new PasswordConnectionInfo(host, username, password); using (var client = new SftpClient(connectionInfo)) { client.Connect(); // Do something here client.Disconnect(); }
See Also