public void Authenticate( string userName, string password )
Shows how to use Connect, Authenticate, and Disconnect methods to establish a connection and disconnect.
using ComponentPro.Net; ... // Create a new class instance. Sftp client = new Sftp(); // Connect to the SFTP server. client.Connect("myserver"); // Or you can specify the SFTP port with // client.Connect("myserver", 22); // Authenticate. client.Authenticate("userName", "password"); // Do something here... client.DownloadFile("/my remote file.dat", "my local file"); // Disconnect. client.Disconnect();