Initializes a new instance of the PrivateKeyConnectionInfo class.
Namespace: Renci.SshNetAssembly: Renci.SshNet (in Renci.SshNet.dll) Version: 0.1.0.0 (1.0.0.0)
Syntax
public PrivateKeyConnectionInfo( string host, string username, params PrivateKeyFile[] keyFiles )
Parameters
- host
- Type:
System String
Connection host.
- username
- Type:
System String
Connection username.
- keyFiles
- Type: Renci.SshNet PrivateKeyFile
Connection key files.
Examples
var connectionInfo = new PrivateKeyConnectionInfo(host, username, new PrivateKeyFile(keyFileStream)); using (var client = new SshClient(connectionInfo)) { client.Connect(); client.Disconnect(); }
var connectionInfo = new PrivateKeyConnectionInfo(host, username, new PrivateKeyFile(keyFileStream1), new PrivateKeyFile(keyFileStream2)); using (var client = new SshClient(connectionInfo)) { client.Connect(); client.Disconnect(); }
See Also