Method DownloadAsync
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
clientSshClientremotePathstringdestinationStreamoptionsSshScpOptionscancellationTokenCancellationToken
Returns
Exceptions
- SshException
The file does not exist, is a directory, or the transfer failed (TransferFailed).