Table of Contents

Class SshCommandException

Namespace
SshSharp
Assembly
SshSharp.dll

A remote command did not succeed (EnsureSuccess()): it exited with a non-zero ExitStatus, was ended by ExitSignal, or ended without reporting either. StandardError holds the end of what it wrote to standard error. The message names the status or the signal only: neither the command nor its output is in it, since exception messages often end up in logs.

public sealed class SshCommandException : SshException, ISerializable
Inheritance
SshCommandException
Implements
Inherited Members

Constructors

SshCommandException(string, int?, SshExitSignal?, ReadOnlyMemory<byte>)

Creates the exception.

Properties

ExitSignal

The signal that ended the command, if any.

ExitStatus

The command's exit status, or null if it ended without one (for example, killed by a signal).

IsStandardErrorTruncated

Whether StandardError holds only the last 4 KiB of a longer standard error.

StandardError

The end of what the command wrote to standard error: all of it up to 4 KiB, otherwise the last 4 KiB (IsStandardErrorTruncated). The full output is in the SshCommandResult the exception came from.

StandardErrorText

StandardError decoded as UTF-8. When it was truncated, a character that the cut split at the start is left out. The text comes from the server: strip control characters before showing it in a terminal.