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

SshClient

public class SshClient : BaseClient
Provides client connection to SSH server.

Gets the list of forwarded ports.

public SshClient(ConnectionInfo connectionInfo)

Initializes a new instance of the SshClient class.

public SshClient(string host, int port, string username, string password)

Initializes a new instance of the SshClient class.

public SshClient(string host, string username, string password)

Initializes a new instance of the SshClient class.

public SshClient(string host, int port, string username, PrivateKeyFile[] keyFiles)

Initializes a new instance of the SshClient class.

public SshClient(string host, string username, PrivateKeyFile[] keyFiles)

Initializes a new instance of the SshClient class.

public void AddForwardedPort(ForwardedPort port)

Adds the forwarded port.

public SshCommand CreateCommand(string commandText)

Creates the command to be executed.

public SshCommand CreateCommand(string commandText, Encoding encoding)

Creates the command to be executed with specified encoding.

public 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.

public 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.

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

Creates the shell.

public 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.

public 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.

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

Creates the shell.

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

Creates the shell stream.

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

Creates the shell stream.

Stops and removes the forwarded port from the list.

public SshCommand RunCommand(string commandText)

Creates and executes the command.