Unable to login to putty session of the ESXi with root credentials, fails with access denied error.
search cancel

Unable to login to putty session of the ESXi with root credentials, fails with access denied error.

book

Article ID: 379970

calendar_today

Updated On:

Products

VMware vCenter Server VMware vSphere ESXi 7.0 VMware vSphere ESXi 8.0

Issue/Introduction

  • "Access denied" error while login to SSH of the ESXi host with root credentials.
  • Same root credentials works for direct host client and DCUI access.

Environment

VMware vSphere 7.x

VMware vSphere 8.x

Cause

This issue occurs due to incorrect sshd configuration of the ESXi host where the PermitRootLogin value is set to NO.

 

Resolution

1. Login to ESXi host using Direct Console User Interface (DCUI) with root credentials


2. Navigate to the sshd_config file under cd /etc/ssh


3. Take a backup of the sshd_config file,


cp sshd_config sshd_config.bak

4. Using a text editor, open the file vi /etc/ssh/sshd_config


5. Locate the line PermitRootLogin no and change it to PermitRootLogin yes


6. Save the configuration file


7. Post that will be able to login to SSH session of the host