PowerTCP SSH and SFTP for .NET

from $349.00
Available Platforms

SFTP Put Code Example

See all PowerTCP SSH and SFTP for .NET Code Examples

 

The following example demonstrates an SFTP session, in which a file is uploaded to the server.

 

Sftp sftp1 = new Sftp();
sftp1.Connection.RemoteEndPoint.HostNameOrAddress = "mySFtpServer.com";
sftp1.Connect();
SshLoginData loginDetails = new SshLoginData();
loginDetails.Username = "myUsername";
loginDetails.Password = "myPassword";
sftp1.Authenticate(loginDetails);
sftp1.Put("c:\\MyFiles\\myFile.txt", "myFile.txt", CopyMode.Copy);
sftp1.Close();

 

To download a trial please visit the PowerTCP SSH and SFTP for .NET product page.