In SDDC Manager, vCenter Upgrade Precheck fails with the error: "vCenter root account is locked or has expired"
search cancel

In SDDC Manager, vCenter Upgrade Precheck fails with the error: "vCenter root account is locked or has expired"

book

Article ID: 414317

calendar_today

Updated On:

Products

VMware SDDC Manager / VCF Installer

Issue/Introduction

The SDDC Manager upgrade precheck fails during the vCenter root account lock check with the error 'vCenter root account is locked or has expired'.

Environment

VMware Cloud Foundation (VCF) 5.x
VMware Cloud Foundation (VCF) 9.x

Cause

  • During an SSH handshake, the client (SDDC Manager) and the server (vCenter Server) agree on a host key algorithm to secure the session. SDDC Manager by default uses the ECDSA and RSA algorithms.
  • If the vCenter Server SSH server configuration has been updated to support only ED25519, the SSH handshake between the SDDC Manager and vCenter Server will fail. 
  • For example, the sshd_config file on the vCenter Server has been updated to allow only ED25519.

    #HostKey /etc/ssh/ssh_host_rsa_key
    #HostKey /etc/ssh/ssh_host_ecdsa_key
    HostKey /etc/ssh/ssh_host_ed25519_key

Resolution

  1. Validate that the vCenter root account has not expired and is not locked.

    1. SSH to the vCenter Server appliance and run the below command to check if the root account password has expired.

      > chage -l root
      Last password change                                    : Month Date, Year
      Password expires                                        : never
      Password inactive                                       : never
      Account expires                                         : never
      Minimum number of days between password change          : ##
      Maximum number of days between password change          : ##
      Number of days of warning before password expires       : #
      

       

    2. Validate if the root account has been locked.

      > faillock --user root
      Login           Failures    Latest failure         From
      root                0

       

    3. If the root account password has expired or is locked,

      1. Reset the lock using the command:

        faillock --user root --reset

         

      2. Reset the root account password. See KB, vCenter Server Root Password Expiration Leading to account disconnect on SDDC Manager.

    4. Retry the pre-upgrade check. If the pre-upgrade check fails, go to step 2.

  2. Validate SSH connectivity from the SDDC Manager to the vCenter Server.

    1. SSH to the SDDC Manager appliance and use the below command to SSH into the vCenter Server:

      ssh vCenter.example.com

       

    2. If the below error occurs, ED25519 has been configured manually on the vCenter Server.

      Unable to negotiate with ###.###.#.## port 22: no matching host key type found. Their offer: ssh-ed25519

       

  3. Restore to default configuration.
    1. Restore the sshd_config on the vCenter Server to defaults as below:

      #HostKey /etc/ssh/ssh_host_rsa_key
      #HostKey /etc/ssh/ssh_host_ecdsa_key
      #HostKey /etc/ssh/ssh_host_ed25519_key

       

    2. Use the fixhosts.py script. See KB article, SSH connection fails with "reject HostKey" or "Primary psc init failed" errors

      Note: The vCenter hostname (hostname -f) must match the case exactly. Example: if hostname -f is UPPERCASE.domain the host key entry must be UPPERCASE.domain.

Additional Information

This could also potentially be caused by mismatched entries in the known_hosts file on SDDC Manager, and can be resolved by following this KB: SSH connection fails with "reject HostKey" or "Primary psc init failed" errors