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

ISshClient

public interface ISshClient : IBaseClient, IDisposable
Provides client connection to SSH server.

Gets the list of forwarded ports.

Adds the forwarded port.

SshCommand CreateCommand(string commandText)

Creates the command to be executed.

SshCommand CreateCommand(string commandText, Encoding encoding)

Creates the command to be executed with specified encoding.

Shell CreateShell(Stream input, Stream output, Stream extendedOutput, string terminalName, uint columns, uint rows, uint width, uint height, IDictionary<TerminalModes, uint> terminalModes, int bufferSize)

Creates the shell.

Shell CreateShell(Stream input, Stream output, Stream extendedOutput, string terminalName, uint columns, uint rows, uint width, uint height, IDictionary<TerminalModes, uint> terminalModes)

Creates the shell.

Shell CreateShell(Stream input, Stream output, Stream extendedOutput)

Creates the shell.

Shell CreateShell(Encoding encoding, string input, Stream output, Stream extendedOutput, string terminalName, uint columns, uint rows, uint width, uint height, IDictionary<TerminalModes, uint> terminalModes, int bufferSize)

Creates the shell.

Shell CreateShell(Encoding encoding, string input, Stream output, Stream extendedOutput, string terminalName, uint columns, uint rows, uint width, uint height, IDictionary<TerminalModes, uint> terminalModes)

Creates the shell.

Shell CreateShell(Encoding encoding, string input, Stream output, Stream extendedOutput)

Creates the shell.

Shell CreateShellNoTerminal(Stream input, Stream output, Stream extendedOutput, int bufferSize = -1)

Creates the shell without allocating a pseudo terminal, similar to the ssh -T option.

ShellStream CreateShellStream(string terminalName, uint columns, uint rows, uint width, uint height, int bufferSize)

Creates the shell stream.

ShellStream CreateShellStream(string terminalName, uint columns, uint rows, uint width, uint height, int bufferSize, IDictionary<TerminalModes, uint> terminalModeValues)

Creates the shell stream.

Creates the shell stream without allocating a pseudo terminal, similar to the ssh -T option.

Stops and removes the forwarded port from the list.

SshCommand RunCommand(string commandText)

Creates and executes the command.