SftpClient UploadFile Method (Stream, String, Boolean, Action UInt64 )SSH .NET Client Library Documentation
Uploads stream into remote file..

Namespace: Renci.SshNet
Assembly: Renci.SshNet (in Renci.SshNet.dll) Version: 0.1.0.0 (1.0.0.0)
Syntax

public void UploadFile(
	Stream input,
	string path,
	bool canOverride,
	Action<ulong> uploadCallback = null
)

Parameters

input
Type: OnlineSystem.IO Stream
Data input stream.
path
Type: OnlineSystem String
Remote file path.
canOverride
Type: OnlineSystem Boolean
if set to true then existing file will be overwritten.
uploadCallback (Optional)
Type: OnlineSystem Action OnlineUInt64 
The upload callback.
Exceptions

Remarks

Method calls made by this method to input, may under certain conditions result in exceptions thrown by the stream.
See Also