SSH Connection Capacity Calculator
Calculate maximum concurrent SSH sessions supportable under sshd MaxSessions and MaxStartups.
About SSH Connection Capacity Calculator
sshd's MaxSessions caps how many multiplexed shell/exec/subsystem sessions can share a single already-authenticated TCP connection, while MaxStartups caps how many unauthenticated connections may be in the login/handshake phase concurrently (beyond that, sshd starts randomly dropping new connections to protect against connection-flood attacks). The theoretical maximum multiplies the two, but the practically useful ceiling is bounded by how many TCP connections actually arrive concurrently — most environments never simultaneously hit both limits at once.
Formula
Session capacity
theoretical_max_sessions = MaxSessions × MaxStartups; memory = sessions × memory_per_session
- M_sessions
- MaxSessions
- M_startups
- MaxStartups
Worked example
With the default values below, SSH Connection Capacity Calculator returns Practical Max Concurrent Sessions of 100. Change any input above and every figure here is recalculated in your browser.
Inputs used
- MaxSessions (per TCP connection)minimum 1
- 10
- MaxStartups (unauthenticated concurrent)minimum 1
- 10
- Expected Concurrent TCP Connectionsminimum 1
- 10
- Memory per Session (MB)minimum 0.1
- 4
Results
- Practical Max Concurrent Sessions
- 100
- Estimated Memory Usage (MB)
- 400.0
- Theoretical Max (MaxSessions × MaxStartups)
- 100
- Memory at Theoretical Max (MB)
- 400.0
- Max Multiplexed Sessions per TCP Connection
- 10
Step by step
- 1Values used
- 2Session capacity
- 3Practical Max Concurrent Sessions= 100
- 4Estimated Memory Usage (MB)= 400.0
- 5Theoretical Max (MaxSessions × MaxStartups)= 100
- 6Memory at Theoretical Max (MB)= 400.0
- 7Max Multiplexed Sessions per TCP Connection= 10
Assumptions and limits
- The result is derived only from the 4 inputs listed above. Anything not among them is not part of the calculation.
- In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
- Figures are rounded for display to 1 decimal place, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.
How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.
Frequently Asked Questions
What happens when MaxStartups is exceeded?
Once unauthenticated connections reach MaxStartups, sshd begins probabilistically refusing new connection attempts (the drop probability ramps up between MaxStartups' three colon-separated values, e.g. 10:30:60, until it hits 100% at the third number) as a defense against connection-flood or brute-force attacks.
Does MaxSessions limit the number of users who can SSH in at once?
No — MaxSessions limits multiplexed sessions (multiple shells/commands) within one already-open SSH connection, not the number of distinct client connections. Two separate users each opening a fresh connection are governed by MaxStartups (pre-auth) and available system resources, not MaxSessions.
Where are MaxSessions and MaxStartups configured?
Both are set in /etc/ssh/sshd_config (`MaxSessions 10`, `MaxStartups 10:30:100`), and require `systemctl reload sshd` (or restart) to take effect on already-running daemons.
