3.8 (L1) Host must automatically terminate idle shells

Information

The host should be configured to automatically terminate idle shell sessions to prevent potential unauthorized access due to forgotten logouts. Setting a timeout for idle SSH connections ensures that any unattended sessions are closed, thereby reducing the security risk. The parameter governing this behavior is UserVars.ESXiShellInteractiveTimeOut with a recommended setting of 900.

Automatically terminating idle shells minimizes the risks associated with unattended sessions. It is a proactive measure to prevent potential unauthorized access to the host.

Solution

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

- From the vSphere Web Client, select the host.
- Click Configure then expand System
- Select Advanced System Settings then click Edit
- Enter ESXiShellInteractiveTimeOut in the filter.
- Set the value for this parameter is set to the appropriate value ( 300 seconds or less).
- Click OK

Note: A value of 0 disables the ESXi ShellInteractiveTimeOut.

Alternately, use the following PowerCLI command:

# Set Remove UserVars.ESXiShellInteractiveTimeOut to 300 on all hosts
Get-VMHost | Get-AdvancedSetting -Name 'UserVars.ESXiShellInteractiveTimeOut' | Set-AdvancedSetting -Value "300"

Impact:

There is no identified negative impact associated with enforcing this control as it serves to bolster the host's security posture.

See Also

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