5.9 Ensure the shell services timeout is set to 1 hour or less

Information

When the ESXi shell or SSH services are enabled on a host, they will run indefinitely. To
avoid this, set the ESXiShellTimeOut, which defines a window of time after which the ESXi
shell and SSH services will automatically be terminated.

It is recommended to set the ESXiShellInteractiveTimeOut together with
ESXiShellTimeOut.

*Rationale*

This reduces the risk of an inactive ESXi shell or SSH service being misused by an
unauthorized party to compromise a host.

Solution

To set the timeout to the desired value, perform the following from the vSphere web client:

1. Select the host and click "Configure" -> "System" -> "Advanced System Settings".
2. Type ESXiShellTimeOut in the filter.
3. Click on the attribute to highlight it.
4. Click the pencil icon to edit.
5. Set the attribute to 3600 seconds (1 hour) or less.
6. Click "OK".

Note: A value of 0 disables the ESXiShellTimeOut.
Alternately, run the following PowerCLI command:

# Set UserVars.ESXiShellTimeOut to 3600 on all hosts
Get-VMHost | Get-AdvancedSetting -Name 'UserVars.ESXiShellTimeOut' | Set- AdvancedSetting -Value "3600"

See Also

https://workbench.cisecurity.org/files/2168

Item Details

Category: ACCESS CONTROL

References: 800-53|AC-11, CSCv7|16.11

Plugin: VMware

Control ID: 6f1b0889650ef32bfafa080dddaf1dd4cd571dfd18ac3af7d06fb44ee063ff59