Method UploadDirectoryAsync
UploadDirectoryAsync(SshClient, string, string, SshScpOptions?, CancellationToken)
Uploads the directory localDirectory and everything in it (scp -r). As with scp, it becomes
remotePath when that does not exist, or a directory inside it when it does.
public static Task UploadDirectoryAsync(this SshClient client, string localDirectory, string remotePath, SshScpOptions? options = null, CancellationToken cancellationToken = default)
Parameters
clientSshClientlocalDirectorystringremotePathstringoptionsSshScpOptionscancellationTokenCancellationToken
Returns
Exceptions
- SshException
The remote scp refused or failed (TransferFailed).