Information
The ESXi shell is an interactive command line environment available from the Direct Console User Interface (DCUI) or remotely via SSH. Activities performed from the ESXi Shell bypass all access controls, but are logged. The recommended setting for the ESXi shell is to be stopped and only started manually when needed, such as when running diagnostics or troubleshooting.
Ensuring non-essential services like the ESXi Shell are deactivated enhances the security posture.
Solution
To disable the ESXi shell, perform the following:
- From the vSphere Web Client, select the host.
- Select Configure then expand System and select Services
- Click on ESXi Shell then click Edit Startup Policy
- Set the Startup Policy is set to Start and Stop Manually
- Click on OK
Alternately, use the following PowerCLI command:
# Set the ESXi shell to start manually rather than automatically for all hosts
Get-VMHost | Get-VMHostService | Where { $_.key -eq "TSM" } | Set-VMHostService -Policy Off
Impact:
No functional impact is recorded. However, if ESXi shell functionalities are needed, manual activation is required.