Monterey - Configure SSHD ClientAliveInterval option set to 900 or less

Information

If SSHD is enabled then it _MUST_ be configured with an Active Client Alive Maximum Count set to 900 or less.

Setting the Active Client Alive Maximum Count to 900 (second) will log users out after a 15-minute interval of inactivity.

NOTE: /etc/ssh/sshd_config will be automatically modified to its original state following any update or major upgrade to the operating system.

Solution

[source,bash]
----
/usr/bin/sed -i.bak 's/.*ClientAliveInterval.*/ClientAliveInterval 900/' /etc/ssh/sshd_config; /bin/launchctl kickstart -k system/com.openssh.sshd
----

See Also

https://github.com/usnistgov/macos_security

Item Details

Category: ACCESS CONTROL, SYSTEM AND COMMUNICATIONS PROTECTION

References: 800-53|AC-12, 800-53|SC-10, CCE|CCE-91008-3, CCI|CCI-001133

Plugin: Unix

Control ID: a1189f29d132b609e3629cefb4d7afa5a1bedb20188d7d93a454cfb239c96be5