5.1.21 Ensure sshd PermitUserEnvironment is disabled

Information

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

More information about the openSSH server configuration is available in the "Configure SSH Server" section overview.

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

Create or edit a *.conf file in the /etc/ssh/sshd_config.d/ directory to set the PermitUserEnvironment parameter to no above any Include entries as follows:

PermitUserEnvironment no

See Also

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

Item Details

Category: CONFIGURATION MANAGEMENT, IDENTIFICATION AND AUTHENTICATION

References: 800-53|CM-1, 800-53|CM-2, 800-53|CM-6, 800-53|CM-7, 800-53|IA-5

Plugin: Unix

Control ID: ff31f699ae1404da69309e486cb93836b08a104caa8bd23633be3f6e2d277475