ComponentPro UltimateSftp

      Connect and authenticate to an SCP server

      Language Filter: AllSend comments on this topic to ComponentPro

      To authenticate to an SCP server, you can simply perform the following steps: Connect to the SFTP/SCP server, verify the server's fingerprint, use your username and password to log in, do your work like uploading file, downloading file, etc. After completing your work, call the Disconnect method to close the SCP session. The example below shows how to authenticate to an SCP server. 

      using ComponentPro.Net;
      // Create a new class instance.
      Scp client = new Scp();
      // Connect to the SCP server.
      // Or you can specify the SCP port with 
      // client.Connect("myserver", 22); 
      // Authenticates to the server.
      client.Authenticate("user", "pass");
      // Do something here...
      client.DownloadFile("/my remote file.dat", "my local file");
      // Disconnect.