5.1.22 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 PermitUserEnvironment parameter to no above any Include entries as follows:

PermitUserEnvironment no

Impact:

Disabling PermitUserEnvironment prevents users from setting environment options at login (for example through a ~/.ssh/environment file). Workflows that rely on user-supplied SSH environment variables will need to use an alternative mechanism before this recommendation is applied.

See Also

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

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: f5b208a39b975310dc5d6cbc227be3189129be350046d4b497d2219bf60424b9