<PackageReference Include="SSH.NET" Version="2013.4.7" />

SshCommand

public class SshCommand : IDisposable
Represents SSH command that can be executed.
public string CommandText { get; }

Gets the command text.

public TimeSpan CommandTimeout { get; set; }

Gets or sets the command timeout.

public string Error { get; }

Gets the command execution error.

public int ExitStatus { get; }

Gets the command exit status.

public Stream ExtendedOutputStream { get; }

Gets the extended output stream.

public Stream OutputStream { get; }

Gets the output stream.

public string Result { get; }

Gets the command execution result.

Begins an asynchronous command execution.

Begins an asynchronous command execution.

public IAsyncResult BeginExecute(AsyncCallback callback, object state)

Begins an asynchronous command execution.

public IAsyncResult BeginExecute(string commandText, AsyncCallback callback, object state)

Begins an asynchronous command execution. 22

public void CancelAsync()

Cancels command execution in asynchronous scenarios.

public void Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged ResourceMessages.

protected virtual void Dispose(bool disposing)

Releases unmanaged and - optionally - managed resources

public string EndExecute(IAsyncResult asyncResult)

Waits for the pending asynchronous command execution to complete.

public string Execute()

Executes command specified by CommandText property.

public string Execute(string commandText)

Executes the specified command text.