5.2.10 Ensure SSH PermitUserEnvironment is disabled
Audit#
Run the following command:
# sshd -T -C user=root -C host="$(hostname)" -C addr="$(grep $(hostname) /etc/hosts | awk '{print $1}')" | grep permituserenvironment
Verify the output matches:
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:
PermitUserEnvironment no