This is my working code, very simplied since i handle it as interfaces and firing event and other stuff:
// been Client SftpClient Client = new SftpClient(Host, User, Password);publicoverridevoid GetFile(string localFile, string remoteFile) {if (!Client.IsConnected) Client.Connect();using (var fileStream = File.OpenWrite(localFile)) { Client.DownloadFile(remoteFile, fileStream); } }publicoverridevoid PutFile(string localFile, string remoteFile) {if (!Client.IsConnected) Client.Connect();using (var file = File.OpenRead(localFile)) { Client.UploadFile(file, remoteFile); } }