Lately I had weird issue while I wanted to connect to newly deployed ESXi via SSH using putty. ESXi object was installed using Vagrant. After typing login, I got error: “SSH Disconnected: No supported authentication methods available”. Of course SSH service was up and running and I was able to connect to ESXi via DCUI and vSphere Client.
No supported authentication methods available
First I ran command in DCUI:
ssh -v localhost:
$ ssh -v localhost debug1: Authentications that can continue: publickey debug1: Next authentication method: publickey debug1: Trying private key: /.ssh/id_rsa debug1: Trying private key: /.ssh/id_dsa debug1: Trying private key: /.ssh/id_ecdsa debug1: Trying private key: /.ssh/id_ed25519 debug1: No more authentication methods to try. Permission denied (publickey).
That was a hint. So I checked file
/etc/ssh/sshd_config
And there it was:
Authentication via password was not allowed.
Resolution
So I changed it to yes:
PasswordAuthentication yes
Saved the file and restarted SSH service:
/etc/init.d/SSH restart
Now I was able to login via SSH:
Now command ssh -v localhost
output is:
debug1: Authentications that can continue: publickey,password debug1: Next authentication method: publickey debug1: Trying private key: /.ssh/id_rsa debug1: Trying private key: /.ssh/id_dsa debug1: Trying private key: /.ssh/id_ecdsa debug1: Trying private key: /.ssh/id_ed25519 debug1: Next authentication method: password root@localhost's password:
So it is fixed.
Check other VMware related posts.