By default, remote command execution is disabled on an ESXi host, and you cannot log in to the host by using a remote shell. You can enable remote command execution from the direct console or from the vSphere Web Client.


At the direct console of the ESXi host, press F2 and provide credentials when prompted.


Scroll to Troubleshooting Options and press Enter.


Choose Enable SSH and press Enter.

On the left, Enable SSH changes to Disable SSH. On the right, SSH is Disabled changes to SSH is Enabled.


Press Esc until you return to the main direct console menu.

After you have enabled SSH, you can log in to the ESXi Shell remotely and run ESXi Shell commands.