Discuss this help topic in SecureBlackbox Forum

Use keep-alives

SSH sessions may experience long periods of inactivity (e.g. where no data is sent from/to the executed command, or where no connections are forwarded for long time). Such sessions might be considered dead by intermediary firewalls or NATs, or even by SSH peers themselves. Keep-alives are special 'dummy' signals sent from one SSH peer to the other that force some data to be transferred over the connection and show the involved parties that the connection is still alive.

With lower-level SSH components you, as a component user, are responsible for sending keep-alive signals. For example, with TElSSHClient or TElSimpleSSHClient, you send keep-alives by calling SendKeepAlive() method:


You can optionally pass a TElSSHTunnelConnection object to TElSSHClient.SendKeepAlive() method to force the keep-alive signal to be sent on the channel layer rather than on global SSH session level. While the outcome is the same (a dummy data is transmitted), these two options are slightly different technically.

Simple forwarding components manage keep-alives themselves. You only need to provide positive values to KeepAlivePeriod and GlobalKeepAlivePeriod properties (each specifying a timeout value in milliseconds) to activate them. KeepAlivePeriod indicates the timeout after which a keep-alive signal is sent on each of the forwarded connections (which are treated independently). GlobalKeepAlivePeriod specifies an SSH session-wide timeout.

How To articles about SSH client

Discuss this help topic in SecureBlackbox Forum