When attempting to establish an SSH connection to the ESXi host using PuTTY with a non-root user account, the connection fails with the error message 'No Supported authentication methods available (server sent: publickey, keyboard-interactive).'
VMware vSphere ESXi
As a workaround to grant SSH access to a local/Domain user or AD Users/Groups, please follow the steps below:
vi /etc/security/access.conf
You will see an output similar to the below (Note: Test is can be a local/Domain Read-only user)
# This file is autogenerated and must not be edited.
+:dcui:ALL
+:root:ALL
+:vpxuser:ALL
-:Test:ALL
-:ALL:ALL
Please note that this workaround is not persistent. After each host reboot, the SSH access configuration for the specific local user must be reapplied to maintain the desired access.
With this method, we can provide Read and Write SSH access to any user created in ESXI, hence access cannot be restricted to Read-Only SSH.
However, since user is added in Read-Only group, user will have restricted access at UI level.