Catalina - Configure SSH ServerAliveInterval option set to 900 or less

Information

SSH _MUST_ be configured with an Active Server Alive Maximum Count set to 900 or less.

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

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

Solution

[source,bash]
----
/usr/bin/grep -q '^ServerAliveInterval' /etc/ssh/ssh_config && /usr/bin/sed -i.bak 's/.*ServerAliveInterval.*/ServerAliveInterval 900/' /etc/ssh/ssh_config || /bin/echo 'ServerAliveInterval 900' >> /etc/ssh/ssh_config
----

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-84919-0

Plugin: Unix

Control ID: 55e1470130c4766de3bf8b66e8ca4ffde3039204c3c5d4bdad6982a50e2b649f