Unable to login to vCenter via SSH as the root user
search cancel

Unable to login to vCenter via SSH as the root user

book

Article ID: 373249

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

Unable to login to vCenter via SSH as the root user. When typing in the root user name and password, will be prompted for root user password continuously without being logged in.

Environment

VMware vCenter Server 6.7.x

VMware vCenter Server 7.0.x

VMware vCenter Server 8.0.x

Cause

The root user has been set to an invalid shell and is unable to login.

Resolution

  1. Login to the vCenter through SSH using the SSO administrator user name and password, ie. [email protected]
  2. Run this command to enable access to the BASH shell:
    • shell.set --enabled true
  3. Type shell and press Enter.
  4. From the BASH shell, run the following command to correct the default shell to BASH for the root user account:
    • sudo chsh -s /bin/bash root
  5. Logout from the SSH session and verify you can connect using the root user account.

Additional Information

If unable to login with [email protected] take a backup and snapshot of the vCenter and then follow the steps in Resetting root password in vCenter Server Appliance 7.x / 8.x but instead of resetting the password use the resolution steps in this KB to change the default shell back to /bin/bash for the root account.