Information
The ESXi host Secure Shell (SSH) daemon must not permit user environment settings.
GROUP ID: V-258762
RULE ID: SV-258762r959010
SSH environment options potentially allow users to bypass access restriction in some configurations. Users must not be able to present environment options to the SSH daemon.
Solution
From an ESXi shell, run the following command:
esxcli system ssh server config set -k permituserenvironment -v no
or
From a PowerCLI command prompt while connected to the ESXi host, run the following commands:
$esxcli = Get-EsxCli -v2
$arguments = $esxcli.system.ssh.server.config.set.CreateArgs()
$arguments.keyword = 'permituserenvironment'
$arguments.value = 'no'
$esxcli.system.ssh.server.config.set.Invoke($arguments)