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

ISubsystemSession

Base interface for SSH subsystem implementations.
bool IsOpen { get; }

Gets a value indicating whether this session is open.

int OperationTimeout { get; set; }

Gets or sets the number of milliseconds to wait for an operation to complete.

Gets the logger factory for this subsystem session.

void Connect()

Connects the subsystem using a new SSH channel session.

Creates a WaitHandle array that is composed of system objects and the specified elements.

void Disconnect()

Disconnects the subsystem channel.

int WaitAny(WaitHandle[] waitHandles, int millisecondsTimeout)

Waits for any of the elements in the specified array to receive a signal, using a 32-bit signed integer to specify the time interval.

void WaitOnHandle(WaitHandle waitHandle, int millisecondsTimeout)

Waits a specified time for a given WaitHandle to be signaled.

Task WaitOnHandleAsync(WaitHandle waitHandle, int millisecondsTimeout, CancellationToken cancellationToken)

Asynchronously waits for a given WaitHandle to be signaled.

Task<T> WaitOnHandleAsync<T>(TaskCompletionSource<T> tcs, int millisecondsTimeout, CancellationToken cancellationToken)

Asynchronously waits for a given TaskCompletionSource<T> to complete.