Table of Contents

Method OpenSftpAsync

Namespace
SshSharp.Sftp
Assembly
SshSharp.dll

OpenSftpAsync(SshClient, CancellationToken)

Starts an SFTP session (the server's sftp subsystem) on this connection. Dispose it when done; the connection stays up.

public static Task<SftpClient> OpenSftpAsync(this SshClient client, CancellationToken cancellationToken = default)

Parameters

client SshClient
cancellationToken CancellationToken

Returns

Task<SftpClient>

Exceptions

SshException

The server offers no sftp subsystem (ChannelClosed), or does not speak SFTP version 3 (ProtocolError).