By default, root login via SSH is disabled to prevent brute force attacks. This articles details how to create a new user on the ESX host, log in as the new user, then change to root access so you have the correct privileges to administer the ESX host.

This article assumes you have the SSH client and the vSphere Client or VMware Infrastructure Client installed. The video also assumes you have configured your ESX host’s services console network. If you can ping the ESX host service console IP, you can proceed. For more information, see Testing network connectivity with a ping command (1003486).

To connect to the ESX host using a SSH client:

  1. Log in to ESX host as root user with the vSphere Client.
  2. Click Users & Groups.
  3. Right-click on a blank area and click Add.
  4. Enter a username and password. Confirm your password. Starting in ESX 4.0 the password needs to be at least 8 characters in length.
  5. Select Grant shell access to this user and click OK.
  6. Open your SSH client.
  7. Complete the necessary fields. Ensure Port is set to 22 and Protocol is set to SSH. Press Enter or click Open.
  8. Log in as the new user you created in step 4.
  9. Change to the root user account.
    1. Type su – and press Enter. This command switches users to root access and provides the path to the root user commands.
    2. Enter the root password and press Enter.

      Now you are logged into the ESX host via ssh as root.

    3. When you are done administering the system, type Exit and press Enter. This reverts you back to your new ESX user. Type exit and press Enter again. Now you have successfully disconnected from your SSH session.

If you wish to allow root login to SSH directly, without using su -, see Enabling root SSH login on an ESX host (8375637).

 

Advertisements