2

I am using SharpSSH to access SFTP. I don't want to download the remote file, I just want to read its data as a string or array of byte. In SharpSSH, I just found function to download the file from source folder to another folder. Is there any way to read the data from file without downloading it either by SharpSSH or other free library?

Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992
user1947393
  • 153
  • 4
  • 18

1 Answers1

1

Do not use SharpSSH, it is a dead project.

With the SSH.NET library, you can use the SftpClient.DownloadFile:

void DownloadFile(string path, Stream output, Action<ulong> downloadCallback = null);
Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992