Table of Contents

Method RunShellAsync

Namespace
SshSharp.Config
Assembly
SshSharp.dll

RunShellAsync(string, CancellationToken)

Runs command with the system shell and completes with whether it exited with status 0. Gives up (and kills the command) after 30 seconds or when cancellationToken is cancelled.

public static Task<bool> RunShellAsync(string command, CancellationToken cancellationToken = default)

Parameters

command string
cancellationToken CancellationToken

Returns

Task<bool>

Exceptions

OperationCanceledException

cancellationToken was cancelled.