Skip to content
ENExplore Calculators

SSH Session Limit Calculator

Work out ssh session limit instantly with clear inputs, formula shown and shareable results.

About SSH Session Limit Calculator

Each SSH session forks a privilege-separated process pair plus the user's shell, costing tens of megabytes. MaxSessions limits multiplexed channels within one connection, while MaxStartups limits unauthenticated connections in progress — the latter is what throttles a fleet of clients reconnecting simultaneously after a network event, producing confusing intermittent failures.

Formula

Session capacity

sessions = users x sessions per user; memory = sessions x per-session memory; MaxSessions ~ sessions per user x 1.5

Worked example

With the default values below, SSH Session Limit Calculator returns Total concurrent sessions of 180. Change any input above and every figure here is recalculated in your browser.

Inputs used

Concurrent interactive usersminimum 1
60
Sessions per userminimum 1
3
Memory per sessionminimum 0.1 MB
22 MB
MaxStartups settingminimum 1
10

Results

Total concurrent sessions
180
Memory consumed by sessions
3.69 GiB
Recommended MaxSessions per connection
5
Connection throttling
MaxStartups of 10 will throttle simultaneous logins during a mass reconnection

Step by step

  1. 1Values used
  2. 2Session capacity
  3. 3Total concurrent sessions= 180
  4. 4Memory consumed by sessions= 3,960,000,000
  5. 5Recommended MaxSessions per connection= 5
  6. 6Connection throttling= MaxStartups of 10 will throttle simultaneous logins during a mass reconnection

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 whole numbers, 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

Why do some connections fail during mass reconnection?

MaxStartups randomly drops connection attempts once the unauthenticated backlog exceeds its start threshold. Raising it, or using connection multiplexing, avoids the problem.

What does MaxSessions actually limit?

The number of open channels — shells, port forwards, SFTP subsystems — multiplexed over one TCP connection. It is not the number of separate logins.

SSH Session Limit Calculator | Calcrivo