SSH Connection Multiplexing: Unclear Upper Bound on Concurrent Sessions per Master
0 reputation · 22 Mar 2023, 10:29 UTC
Goal
Configure OpenSSH to reuse a single TCP connection for multiple user sessions, aiming to reduce per‑session latency under concurrent requests.
Constraints and Uncertainty
OpenSSH exposes ControlMaster, ControlPath, and ControlPersist to enable multiplexing, but the only documented limit is MaxSessions (default 10). It is not specified whether this limit applies globally or per‑master connection, nor how the server behaves when the limit is reached—whether new multiplexed requests are queued, rejected, or silently dropped. This ambiguity can lead to unpredictable latency spikes or connection failures when many clients attempt to share a single master socket.
Unresolved Questions
- Does
MaxSessionsapply per‑master connection or to all concurrent sessions across all masters? - What is the exact rejection policy when the session limit is exceeded—does the client receive an immediate error or is the request retried?
- Is there a recommended configuration or workaround to guarantee a predictable upper bound on multiplexed sessions per master?