5.2.20 Ensure SSH MaxSessions is set to 10 or less
Audit#
Run the following command and verify that output MaxSessions is 10 or less:
# sshd -T -C user=root -C host="$(hostname)" -C addr="$(grep $(hostname) /etc/hosts | awk '{print $1}')" | grep -i maxsessions
maxsessions 10
Run the following command and verify the output:
Nothing should be returned
Remediation#
Edit the /etc/ssh/sshd_config file to set the parameter as follows:
Default Value:
MaxSessions 10