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

Renci.SshNet.SshClient

namespace Renci.SshNet { public class SshClient : BaseClient, ISshClient, IBaseClient, IDisposable { public IEnumerable<ForwardedPort> ForwardedPorts { get; } public SshClient(ConnectionInfo connectionInfo); public SshClient(string host, int port, string username, string password); public SshClient(string host, string username, string password); public SshClient(string host, int port, string username, params IPrivateKeySource[] keyFiles); public SshClient(string host, string username, params IPrivateKeySource[] keyFiles); public void AddForwardedPort(ForwardedPort port); public void RemoveForwardedPort(ForwardedPort port); public SshCommand CreateCommand(string commandText); public SshCommand CreateCommand(string commandText, Encoding encoding); public SshCommand RunCommand(string commandText); 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); public Shell CreateShell(Stream input, Stream output, Stream extendedOutput, string terminalName, uint columns, uint rows, uint width, uint height, IDictionary<TerminalModes, uint> terminalModes); public Shell CreateShell(Stream input, Stream output, Stream extendedOutput); 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); 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); public Shell CreateShell(Encoding encoding, string input, Stream output, Stream extendedOutput); public Shell CreateShellNoTerminal(Stream input, Stream output, Stream extendedOutput, int bufferSize = -1); public ShellStream CreateShellStream(string terminalName, uint columns, uint rows, uint width, uint height, int bufferSize); public ShellStream CreateShellStream(string terminalName, uint columns, uint rows, uint width, uint height, int bufferSize, IDictionary<TerminalModes, uint> terminalModeValues); public ShellStream CreateShellStreamNoTerminal(int bufferSize = -1); } }