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

Renci.SshNet.BaseClient

public abstract class BaseClient : IBaseClient, IDisposable
Serves as base class for client implementations, provides common client functionality.
namespace Renci.SshNet { public abstract class BaseClient : IBaseClient, IDisposable { public ConnectionInfo ConnectionInfo { get; } public virtual bool IsConnected { get; } public TimeSpan KeepAliveInterval { get; set; } public event EventHandler<ExceptionEventArgs> ErrorOccurred; public event EventHandler<HostKeyEventArgs> HostKeyReceived; public event EventHandler<SshIdentificationEventArgs> ServerIdentificationReceived; protected BaseClient(ConnectionInfo connectionInfo, bool ownsConnectionInfo); public void Connect(); public Task ConnectAsync(CancellationToken cancellationToken); public void Disconnect(); public void SendKeepAlive(); protected virtual void OnConnecting(); protected virtual void OnConnected(); protected virtual void OnDisconnecting(); protected virtual void OnDisconnected(); public void Dispose(); protected virtual void Dispose(bool disposing); protected void CheckDisposed(); } }