If running commands remotely is disabled on an ESXi host, you cannot log in to the host by using a remote shell. You can enable running commands remotely from the direct console or from the vSphere Client.
Prerequisites
Procedure
What to do next
After you have enabled SSH, you can log in to the ESXi Shell remotely and run ESXi Shell commands.