Method OpenSftpAsync
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
clientSshClientcancellationTokenCancellationToken
Returns
Exceptions
- SshException
The server offers no
sftpsubsystem (ChannelClosed), or does not speak SFTP version 3 (ProtocolError).