Overview
In these times of APIs-everywhere, it may sound like an anachronism the use SFTP to connect to a remote server and get a list of files for exchanging information, but in the financial world (sadly) it’s more common than you think.
In my current project I’ve to connect to a remote server via Secure File Transfer Protocol (aka SFTP) using a user name, a RSA private key and a phassphrase. Once connected, the goal is to read some files from a remote folder and download them to a local folder.
To accomplish this I recommend you to use SSH.NET, one of the most popular SSH libraries for .NET, available on nuget.

More info about SSH.NET here: https://github.com/sshnet/SSH.NET/
Using SSH.NET to connect to the server
The most difficult part here is configure the connection, as usual. We need to provide the server url and port, in combination with the username…
View original post 344 more words

Leave a comment