Showing posts with label SFTP. Show all posts
Showing posts with label SFTP. Show all posts

Thursday 5 September 2019

C# to connect to SFTP Server

Overview:  This is a quick way to connect to an SFTP server programmatically.

Steps:
1. Create a C# project in Visual Studio, I used VS2019 and .NET core in this example.
2. Add the SSH.NET Nugget package to the project as shown below


3. The code snippet below is to simple to explain, you not they I'm using the SftpClient class from the Renci.SshNet Nugget package to do the Sftp file transfer.


Azure blob storage supports SFTP, you can use cheap/redundant blob storage and accepts SFTP - secure, cheap way to setup the server side of SFTP.