MaxSessions

The sshd_config setting that limits how many shell, login or subsystem sessions may share one SSH network connection.

In more detail

The OpenSSH default is ten. Setting it to one stops a single connection being reused for extra sessions, and zero blocks shell, login and subsystem sessions entirely while still allowing forwarding. If the file never mentions it, sshd -T still reports the default, which is why an audit should read the effective configuration.

Examples

MaxSessions 5
sshd -T -f test_config -h hostkey | grep maxsessions

Related terms

Taught in

References