Table of Contents

Method SendBreakAsync

Namespace
SshSharp
Assembly
SshSharp.dll

SendBreakAsync(TimeSpan?, CancellationToken)

Sends a BREAK (RFC 4335), as OpenSSH's ~B escape does: a serial-line break, which console servers pass on to the device they connect to (to reach a router's ROM monitor, for example), and OpenSSH's sshd sends to a session's terminal. Returns whether the server performed it; servers that do not support it, or a session without a terminal on OpenSSH, answer false.

public Task<bool> SendBreakAsync(TimeSpan? length = null, CancellationToken cancellationToken = default)

Parameters

length TimeSpan?

How long the break lasts; 1 second (OpenSSH's ~B) when null. Servers may use their own length.

cancellationToken CancellationToken

Cancels waiting for the answer.

Returns

Task<bool>