Client - SetOptions
[Client] void SetOptions(Options const& opts);
[ClientBase] public void SetOptions(Options opts);
Key re-exchange and keep-alive are enabled by default, and do not need to be enabled explicitly by calling SetOptions.
If starting of key re-exchange is enabled, FlowSsh will start it every hour, or after every 1 GB of transferred data. If starting of key re-exchange is disabled, FlowSsh will still respond to key re-exchanges started by the server.
FlowSsh uses sensible values of keep-alive parameters by default. You should only need to change these values if you are solving an unexpected problem. If you are solving an unexpected problem, then the nature of that problem can guide what values to use.
Send-based keep-alive is a mechanism where FlowSsh will periodically send a packet of type SSH_MSG_IGNORE if it has not sent any SSH packets for a duration of time exceeding the send-based keep-alive timeout. This works with all remote SSH software, but does not reliably detect all types of broken network connections.
Receive-based keep-alive is a mechanism where FlowSsh will periodically send a packet of type SSH_MSG_GLOBAL_REQUEST if it has not received any SSH packets for a duration of time exceeding the receive-based keep-alive timeout. If the remote SSH software does not respond within the unresponsiveness timeout, FlowSsh terminates the connection. This reliably detects broken network connections, but it can have false positives if the remote party stalls processing for long periods of time. For example, some servers stall when executing a command or handling the initial login.
The relaxed receive-based keep-alive timeout is used during initial stages of the SSH session, before authentication has succeeded. This accommodates servers that may need a long time to process a user authentication request and do not respond during.
There exist rare servers which cannot handle a packet of type SSH_MSG_GLOBAL_REQUEST from a client. FlowSsh will disable receive-based keep-alive when the SSH version string suggests the server may not properly handle global requests.