Method StartCommandAsync
- Namespace
- SshSharp
- Assembly
- SshSharp.dll
StartCommandAsync(string, SshSessionOptions?, CancellationToken)
Starts command with its input and output as streams, for long-running or interactive commands. For a command whose
output fits in memory, RunCommandAsync(string, CancellationToken) is simpler.
public Task<SshSession> StartCommandAsync(string command, SshSessionOptions? options = null, CancellationToken cancellationToken = default)
Parameters
commandstringoptionsSshSessionOptionscancellationTokenCancellationToken
Returns
Exceptions
- SshException
The server refused the terminal or the command, or the connection failed.