Unable to connect via SSH as the admin user
search cancel

Unable to connect via SSH as the admin user

book

Article ID: 421184

calendar_today

Updated On:

Products

VMware HCX

Issue/Introduction

  • Direct SSH access attempts using the admin account return an "Access Denied" or "Authentication Failed" error.
  • Still able to log in as the admin user via the HCX System Appliance Management Interface (Appliance Management UI) at https://<HCX-Manager-IP>:9443/
  • The SSH service is confirmed to be Enabled in the appliance settings.
  • The following entries are found in /var/log/messages on the HCX Manager:
    sshd[22439]: Failed password for admin from <IP address> port <port number> ssh2
    pam_faillock(sshd:auth): Consecutive login failures for user admin account temporarily locked

Cause

The admin user account has been locked by the Pluggable Authentication Module (PAM) faillock mechanism. This occurs after a specific number of consecutive failed login attempts (often caused by incorrect credentials in discovery tools, security scanners, or manual entry errors).

Resolution

Steps to Unlock the Admin Account

  1. Open the HCX Manager VM Console (Web Console or Remote Console) from the vSphere Client.
  2. Log in as the root user.
    • Note: If you do not know the root password, see the Additional Information section below.
  3. Run the following command to clear the lockout for the admin user:|
    faillock --user admin --reset
  4. Verify the account is unlocked by switching to the admin user:
    su admin
  5. Type exit to return to the root prompt, then log out of the console.
  6. Attempt a new SSH connection using the admin account to verify connectivity.

Additional Information

Reset root/admin password for PhotonOS based HCX Manager