Rule ID
SV-258785r933416_rule
Version
V1R1
CCIs
CCI-000366
While enabling Transmission Control Protocol (TCP) tunnels is a valuable function of sshd, this feature is not appropriate for use on the ESXi hypervisor.
From an ESXi shell, run the following command:
# esxcli system ssh server config list -k allowtcpforwarding
or
From a PowerCLI command prompt while connected to the ESXi host, run the following commands:
$esxcli = Get-EsxCli -v2
$esxcli.system.ssh.server.config.list.invoke() | Where-Object {$_.Key -eq 'allowtcpforwarding'}
Example result:
allowtcpforwarding no
If "allowtcpforwarding" is not configured to "no", this is a finding.From an ESXi shell, run the following command: # esxcli system ssh server config set -k allowtcpforwarding -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 = 'allowtcpforwarding' $arguments.value = 'no' $esxcli.system.ssh.server.config.set.Invoke($arguments)