Putty Fatal Error No supported authentication methods available
This tutorial guides you on how to fix Putty Fatal Error No supported authentication methods available (server sent: public key) while trying to SSH in to VM instance.
Putty Fatal Error No supported authentication methods available
When I was trying to connect to my f1-micro VM instance using linux user “demouser” on Google Cloud Platform through Putty, I got the following error as shown in the screenshot.
Are you also facing the above error “No supported authentication methods available (server sent: public key)” after adding Linux user and SSH keys to you instance ? then follow the below solution.
Solution
I will assume that, you had setup SSH keys correctly using the tutorial Managing SSH keys in metadata. Basically, you need to use Putty to generate public and private keys. Then use the public key and set up for the SSH user in the metadata.
Then you need to follow the below steps to turn on Password Authentication for SSH login using Putty.
- Use vim editor to open the sshd_config file under directory /etc/ssh/sshd_config.
- Set the value for PasswordAuthentication as “yes” instead of “no“.
- Finally, restart SSH server using the following command /etc/init.d/ssh restart
Also, you can follow How to provide access to specific folders , after creating non-root SSH user. Basically restricting access to specific folders only for users other then root user.
That’s it. And the error should have disappeared now and you should be able to connect to VM instance on the Google Cloud using Putty.
Hope it helped 🙂
- How to set or change root password in Ubuntu Linux ?
- Docker: Error response from daemon: OCI runtime create failed: container_linux.go:349
- How to find which users belongs to a specific group in linux
- Give write permissions for specific user or group for specific folder in linux
- How to unzip a zip file from Terminal (Google Cloud Shell)
- Build a Docker Image with a Dockerfile and Cloud Build in GCP?
- How to create GCP project on Google Cloud Platform
- GCP Virtual Private Cloud (VPC) Networks Fundamentals
- How to create GCP project on Google Cloud Platform
- Is it possible to change Google Cloud Platform Project ID ?
- Create non-root SSH user account and provide access to specific folders
- MariaDB – How to set max_connections permanently ?