Ssh – Unable to SSH Google Cloud Engine instance through gcloud & Putty from Windows 10

google-cloud-platformgoogle-compute-engineputtysshwindows 10

I could do SSH & SFTP from a windows 7 laptop to my Google Compute Engine instance until I changed my laptop & also upgraded to Windows 10. In the event I lost my previous settings, so had to start it all over again. I followed the steps provided from below but couldn't succeed –

Cannot connect to Compute Engine instance via SSH

https://cloud.google.com/compute/docs/console#sshkeys

Unable to SSH to Google Cloud

My setup is same with just one change that my local machine is running on Windows 10.

I used gcloud sdk on windows 10, which updates the first time generated public key by itself onto my cloud instance, I could verify that also.

But the login from both gcloud & Putty fails with the error code "Disconnected: No supported authentication methods available(server sent: publickey)".

However, I could login successfully through the Web SSH.

What could be the issue?

It is that I have to use my gmail account/email only (in some specific format) while generating the keys? or Windows 10 SDK compatibility issue? or something else?

Best Answer

OP has resolved this issue by copying his SSH keys to authorized_keys file. This issue can be caused if Google accounts daemon is not running on your VM. This daemon is responsible for syncing ssh keys and user account information between the metadata and VM. For more information on accounts daemon you can visit this link.

Related Topic