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: c57afd7325d2d483f031837e7ab1c509ae5155ae3d4347320dc8c3909273ab72