Is there a way to download a file from a sftp server with .net core 3.1 ?
I found various answers which are all outdated. (for example, ssh.net cannot be found anymore)
How is the current status in this topic?
Is there a way to download a file from a sftp server with .net core 3.1 ?
I found various answers which are all outdated. (for example, ssh.net cannot be found anymore)
How is the current status in this topic?
There is an updated version of SSH.net called Neon.SSh.Net https://www.nuget.org/packages/Neon.SSH.NET/
works in the same way as the old version from Renci.
...
var client = new SftpClient(host,port,username,password);
client.Connect();
using (Stream fileStream = File.OpenWrite("c:\\temp\\file.tmp"))
{
_client.DownloadFile(ftpFilePath, fileStream);
}
...