Steps to identify the system connecting to ESXi Host with incorrect credentials using the log files mentioned below.
/var/run/log/auth.log
YYYY-MM-DDTHH:MM:SSZ sshd[318439]: Connection from 10.xx.yy.zz port 62430
YYYY-MM-DDTHH:MM:SSZ sshd[318439]: Accepted keyboard-interactive/pam for root from 10.xx.yy.zz port 62430 ssh2
YYYY-MM-DDTHH:MM:SSZ sshd[335145]: Connection from 10.xx.yy.zz port 61574
YYYY-MM-DDTHH:MM:SSZ sshd[335148]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=10.xx.yy.zz user=root
YYYY-MM-DDTHH:MM:SSZ sshd[335145]: error: PAM: Authentication failure for root from 10.xx.yy.zz
YYYY-MM-DDTHH:MM:SSZ sshd[335145]: Accepted keyboard-interactive/pam for root from 10.xx.yy.zz port 61574 ssh2
/var/run/log/rhttpproxy.log
YYYY-MM-DDTHH:MM:SS7Z verbose rhttpproxy[278CB70] [Originator@6876 sub=Proxy Req 14800] Resolved endpoint : [N7Vmacore4Http16LocalServiceSpecE:0x02103358] _serverNamespace = /vpxa action = Allow _port = 8089
YYYY-MM-DDTHH:MM:SS7Z verbose rhttpproxy[29C2B70] [Originator@6876 sub=Proxy Req 15643] Resolved endpoint : [N7Vmacore4Http16LocalServiceSpecE:0x02103358] _serverNamespace = /vpxa action = Allow _port = 8089
YYYY-MM-DDTHH:MM:SS6Z verbose rhttpproxy[2606B70] [Originator@6876 sub=Proxy Req 15721] New proxy client <SSL(<io_obj p:0x02303ba8, h:16, <TCP '10.xx.yy.zz:443'>, <TCP '10.xx.yy.zz:63789'>>)>
YYYY-MM-DDTHH:MM:SS7Z verbose rhttpproxy[27CDB70] [Originator@6876 sub=Proxy Req 15721] Resolved endpoint : [N7Vmacore4Http16LocalServiceSpecE:0x02103358] _serverNamespace = /vpxa action = Allow _port = 8089
Temporarily unlock the account:
To workaround this issue, please follow the below steps:
- Login to ESXi host directly via console (for Dell its iDRAC, for HPE its iLO, for Cisco its CIMC etc) Direct Console Interface (DCUI) with "root" account.
- Press "F2", go to "Troubleshooting Options".
- Enable "ESXi Shell" using "Enable ESXi Shell" Option and go back to main menu.
- Press "CTRL+ALT+F1" to switch to "ESXi Shell"
- Type Command "pam_tally2 --user root" to view total failed login attempt from root.
Example "there are 60 failed login attempt."
# pam_tally2 --user root
Login Failures Latest failure From
root 60 10/09/20 15:59:56 unknown
- Type Command "pam_tally2 --user root --reset" to reset the lock and validate if failed attempts are reset.
Example
# pam_tally2 --user root --reset
Login Failures Latest failure From
root 61 10/09/20 15:60:56 unknown
# pam_tally2 --user root
Login Failures Latest failure From
root 0
- Now we will be able to login to ESXi via ESXi Host Client UI or via ssh.