You can use the vSphere Web Client to enable local and remote (SSH) access to the ESXi Shell and to set the idle timeout and availability timeout.
If you want to use an authorized SSH key, you can upload it. See Uploading an SSH Key to Your ESXi Host.
- Browse to the host in the vSphere Web Client inventory.
- Click the Manage tab and click Settings.
- Under System, select Security Profile.
- In the Services panel, click Edit.
- Select a service from the list.
- ESXi Shell
- Direct Console UI
- Click Service Details and select the startup policy Start and stop manually.
When you select Start and stop manually, the service does not start when you reboot the host. If you want the service to start when you reboot the host, select Start and stop with host.
- Select Start to enable the service.
- Click OK.
What to do next
Set the availability and idle timeouts for the ESXi Shell. See Create a Timeout for ESXi Shell Availability in the vSphere Web Client and Create a Timeout for Idle ESXi Shell Sessions in the vSphere Web Client