Table of Contents

Method UploadFileAsync

Namespace
SshSharp.Scp
Assembly
SshSharp.dll

UploadFileAsync(SshClient, string, string, SshScpOptions?, CancellationToken)

Uploads localPath to remotePath (a file, or an existing directory to put it in).

public static Task UploadFileAsync(this SshClient client, string localPath, string remotePath, SshScpOptions? options = null, CancellationToken cancellationToken = default)

Parameters

client SshClient
localPath string
remotePath string
options SshScpOptions
cancellationToken CancellationToken

Returns

Task

Exceptions

SshException

The remote scp refused or failed (TransferFailed).