mirror of
https://github.com/usnistgov/macos_security.git
synced 2026-02-03 05:53:24 +00:00
Concurrent session limit for SSH is not working #314
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @cistone on GitHub.
Summary
Setting "os_ssh_max_sessions_configure" does not limit connections on my machine.
Steps to reproduce
Set "MaxSessions 10" in sshd.conf
from another machine, open multiple ssh connections to the ssh server.
Operating System version
20A5343i
What is the current bug behavior?
The number of sessions is not capped at 10.
What is the expected correct behavior?
After 10 connections, further connection attempts should fail.
@robertgendler commented on GitHub:
The MaxSessions setting within sshd.conf does not do what people think it does exactly.
This turns out the only way to limit it is by editing the kernel variables which is not advised.
sudo sysctl -w kern.tty.ptmx_max=
The AC-10 requirement in the NIST 800-53 is met inherently with os_limit_gui_sessions.