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

ChannelSession

Implements Session SSH channel.
public ChannelSession(ISession session, uint localChannelNumber, uint localWindowSize, uint localPacketSize)

Initializes a new instance of the ChannelSession class.

public void Open()

Opens the channel.

public bool SendBreakRequest(uint breakLength)

Sends the exec request.

public bool SendEndOfWriteRequest()

Sends eow@openssh.com request.

public bool SendEnvironmentVariableRequest(string variableName, string variableValue)

Sends the environment variable request.

public bool SendExecRequest(string command)

Sends the exec request.

public bool SendExitSignalRequest(string signalName, bool coreDumped, string errorMessage, string language)

Sends the exit signal request.

public bool SendExitStatusRequest(uint exitStatus)

Sends the exit status request.

public bool SendKeepAliveRequest()

Sends keepalive@openssh.com request.

public bool SendLocalFlowRequest(bool clientCanDo)

Sends the local flow request.

public bool SendPseudoTerminalRequest(string environmentVariable, uint columns, uint rows, uint width, uint height, IDictionary<TerminalModes, uint> terminalModeValues)

Sends the pseudo terminal request.

public bool SendShellRequest()

Sends the shell request.

public bool SendSignalRequest(string signalName)

Sends the signal request.

public bool SendSubsystemRequest(string subsystem)

Sends the subsystem request.

public bool SendWindowChangeRequest(uint columns, uint rows, uint width, uint height)

Sends the window change request.

public bool SendX11ForwardingRequest(bool isSingleConnection, string protocol, byte[] cookie, uint screenNumber)

Sends the X11 forwarding request.