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

Renci.SshNet.SshCommand

public class SshCommand : IDisposable
Represents SSH command that can be executed.
namespace Renci.SshNet { public class SshCommand : IDisposable { public string CommandText { get; } public TimeSpan CommandTimeout { get; set; } public int? ExitStatus { get; } public string ExitSignal { get; } public Stream OutputStream { get; } public Stream ExtendedOutputStream { get; } public string Result { get; } public string Error { get; } public Stream CreateInputStream(); public Task ExecuteAsync(CancellationToken cancellationToken = default(CancellationToken)); public IAsyncResult BeginExecute(); public IAsyncResult BeginExecute(AsyncCallback callback); public IAsyncResult BeginExecute(AsyncCallback callback, object state); public IAsyncResult BeginExecute(string commandText, AsyncCallback callback, object state); public string EndExecute(IAsyncResult asyncResult); public void CancelAsync(bool forceKill = false, int millisecondsTimeout = 500); public string Execute(); public string Execute(string commandText); public void Dispose(); protected virtual void Dispose(bool disposing); } } namespace Renci.SshNet { public class ForwardedPortRemote : ForwardedPort { public IPAddress BoundHostAddress { get; } public string BoundHost { get; } public uint BoundPort { get; } public IPAddress HostAddress { get; } public string Host { get; } public uint Port { get; } public ForwardedPortRemote(IPAddress boundHostAddress, uint boundPort, IPAddress hostAddress, uint port); public ForwardedPortRemote(uint boundPort, string host, uint port); public ForwardedPortRemote(string boundHost, uint boundPort, string host, uint port); } }