<PackageReference Include="SSH.NET" Version="2020.0.0" />

ScpClient

public class ScpClient : BaseClient
Provides SCP client functionality.
public uint BufferSize { get; set; }

Gets or sets the size of the buffer.

public TimeSpan OperationTimeout { get; set; }

Gets or sets the operation timeout.

Gets or sets the transformation to apply to remote paths.

Occurs when downloading file.

Occurs when uploading file.

public ScpClient(ConnectionInfo connectionInfo)

Initializes a new instance of the ScpClient class.

public ScpClient(string host, int port, string username, string password)

Initializes a new instance of the ScpClient class.

public ScpClient(string host, string username, string password)

Initializes a new instance of the ScpClient class.

public ScpClient(string host, int port, string username, PrivateKeyFile[] keyFiles)

Initializes a new instance of the ScpClient class.

public ScpClient(string host, string username, PrivateKeyFile[] keyFiles)

Initializes a new instance of the ScpClient class.

public void Download(string filename, Stream destination)

Downloads the specified file from the remote host to the stream.

public void Download(string filename, FileInfo fileInfo)

Downloads the specified file from the remote host to local file.

public void Download(string directoryName, DirectoryInfo directoryInfo)

Downloads the specified directory from the remote host to local directory.

public void Upload(Stream source, string path)

Uploads the specified stream to the remote host.

public void Upload(FileInfo fileInfo, string path)

Uploads the specified file to the remote host.

public void Upload(DirectoryInfo directoryInfo, string path)

Uploads the specified directory to the remote host.