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

  1. At the direct console of the ESXi host, press F2 and provide credentials when prompted.
  2. Scroll to Troubleshooting Options and press Enter.
  3. 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.
  4. Press Esc until you return to the main direct console menu.

What to do next

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