4.2.21 Ensure sshd PermitUserEnvironment is disabled

Information

The PermitUserEnvironment option allows users to present environment options to the SSH daemon.

Permitting users the ability to set environment variables through the SSH daemon could potentially allow users to bypass security controls (e.g. setting an execution path that has SSH executing trojan'd programs)

Solution

Edit the /etc/ssh/sshd_config file to set the parameter PermitUserEnvironment to no :

PermitUserEnvironment no

Note: First occurrence of a option takes precedence.

See Also

https://workbench.cisecurity.org/benchmarks/15965

Item Details

Category: CONFIGURATION MANAGEMENT

References: 800-53|CM-7b.

Plugin: Unix

Control ID: 311c0ff7019c5edc8a2b6ca74fd7b49ff2eb7bf9cd10b74331f2024b2ff25398