Contents · Forum Home · StreamSec Tools 4.1.5.363 documentation

StreamSec.SSH.SocketServer

Feature notes: SSH implementation notes

Classes, interfaces and records

classTstSSHSocketServer — component reference

(no public members)

classtTCPDaemon

inherits from TThread

constructor Create(aServer: TstSSHSocketServer); destructor Destroy; override;

classTstSSHSocketServer — component reference

inherits from TstCustomSSHServer

constructor Create(aOwner: TComponent); override;
Standard component constructor. Applications almost never call this directly; drop the component on a form or create it in code, then set BindIP/BindPort and the inherited host-key/authentication properties before activating. It only initialises the bind defaults (0.0.0.0:22, CloseAllOnDeactivate=True). » member page
destructor Destroy; override;
Standard component destructor. Applications rarely call it directly (freeing the owner form frees the component). It forces CloseAllOnDeactivate to True so that tearing the server down also shuts every still-open connection instead of leaking them. » member page
property BindIP: string read FBindIP write SetBindIP;
The local IPv4/IPv6 address the listening socket binds to when the server is activated. Leave it at the default '0.0.0.0' to accept connections on every local interface; set a specific address to restrict the daemon to one NIC (e.g. loopback only). Server-side only. Changing it while active has no effect until the next activation. » member page
property BindPort: Integer read fBindPort write SetBindPort default 22;
The TCP port the listening socket binds to. Defaults to the standard SSH port 22; set a non-privileged port (or an alternate) when running without elevated rights or alongside another SSH daemon. Server-side only; takes effect on the next activation. » member page
property CloseAllOnDeactivate: Boolean read FCloseAllOnDeactivate write SetCloseAllOnDeactivate default True;
Controls what happens to live connections when the server is deactivated. When True (the default) deactivating the server sets the process-global close-all flag, so every open SSH session and any forwarded/tunnelled channel it carries is torn down immediately; set it False to stop accepting new c... Full description »
property SendTimeout: Cardinal read fSendTimeout write fSendTimeout default cSSHSendTimeoutMSec;
Milliseconds a packet may wait for room in a connection's full send buffer, with not one byte taken, before the connection counts as broken (default 30000). Full description »
property OnError: tSSHServerErrorEvent read fOnError write fOnError;
Fired when the listening daemon dies on an unexpected exception - for instance when waiting on the listening socket fails (activation-time bind failures raise from Active := True instead and never reach this event). Full description »

Types (enumerations, sets, aliases)

proctSSHServerErrorEvent

Signature for TstSSHSocketServer.OnError: aException is the exception that terminated the listening daemon (e.g. a failed wait on the listening socket).

  tSSHServerErrorEvent = procedure (Sender: TObject; aException: Exception) of object;