Class ExecuteOptions
- Namespace
- Tmds.Ssh
- Assembly
- Tmds.Ssh.dll
Options for executing commands.
public sealed class ExecuteOptions
- Inheritance
-
ExecuteOptions
- Inherited Members
Properties
AllocateTerminal
Gets or sets whether to allocate a pseudo-terminal.
public bool AllocateTerminal { get; set; }
Property Value
Remarks
Defaults to false.
EnvironmentVariables
Gets or sets environment variables for the remote process.
public Dictionary<string, string> EnvironmentVariables { get; set; }
Property Value
Remarks
Often SSH servers don't accept environment variables (for security).
When AllocateTerminal is set to true, 'TERM' is ignored when its value does not match TerminalType.
ForwardX11
Gets or sets whether to request X11 forwarding.
public ForwardMode? ForwardX11 { get; set; }
Property Value
Remarks
When null (the default), ForwardX11 is used.
When set to Request, X11 setup failures are logged and the remote process is started without X11 forwarding. When set to Require, X11 setup failures fail the operation.
The forwarded display and authentication are configured using X11Display, ForwardX11Trusted, ForwardX11Timeout, and XAuthLocation.
StandardErrorEncoding
Gets or sets the Encoding for standard error.
public Encoding StandardErrorEncoding { get; set; }
Property Value
StandardInputEncoding
Gets or sets the Encoding for standard input.
public Encoding StandardInputEncoding { get; set; }
Property Value
StandardOutputEncoding
Gets or sets the Encoding for standard output.
public Encoding StandardOutputEncoding { get; set; }
Property Value
TerminalHeight
Gets or sets the terminal height in characters.
public int TerminalHeight { get; set; }
Property Value
Remarks
Defaults to 24.
TerminalSettings
Configure additional terminal settings.
public TerminalSettings TerminalSettings { get; }
Property Value
TerminalType
Gets or sets the terminal type.
public string TerminalType { get; set; }
Property Value
Remarks
Defaults to "xterm-256color".
TerminalWidth
Gets or sets the terminal width in characters.
public int TerminalWidth { get; set; }
Property Value
Remarks
Defaults to 80.
WindowSize
Gets or sets the SSH channel window size in bytes.
public int? WindowSize { get; set; }
Property Value
- int?
Remarks
When null (the default), DefaultWindowSize is used.
The window size controls the maximum amount of data that can be sent by the remote end before it must wait for acknowledgement. Larger values can improve throughput on high-latency or high-bandwidth links at the cost of higher memory usage per channel.