Information
Enabling the automatic deactivation of shell services minimizes the attack surface on the host. The time window for the ESXi Shell and SSH services' availability is defined by UserVars.ESXiShellTimeOut, after which these services are terminated. The recommended setting for this parameter is 600.
Automatically deactivating shell services after a defined time window helps in reducing the risk associated with potential unauthorized access, ensuring a more secure ESXi host environment.
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 ESXiShellTimeOut in the filter.
- Set the value for this parameter is set to 3600 (1 hour) or less
- 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"
Impact:
There's no negative functional impact identified with this control; it contributes towards enhancing the host's security posture by limiting the availability of shell services.