Table of Contents

Method DownloadAsync

Namespace
SshSharp.Scp
Assembly
SshSharp.dll

DownloadAsync(SshClient, string, Stream, SshScpOptions?, CancellationToken)

Downloads the remote file remotePath into destination.

public static Task DownloadAsync(this SshClient client, string remotePath, Stream destination, SshScpOptions? options = null, CancellationToken cancellationToken = default)

Parameters

client SshClient
remotePath string
destination Stream
options SshScpOptions
cancellationToken CancellationToken

Returns

Task

Exceptions

SshException

The file does not exist, is a directory, or the transfer failed (TransferFailed).