Reputation: 1143
I am trying to follow a simple process of ssh'ing to the instance that is described here. Unfortunately I keep getting this error:
Server refused our key FATAL
ERROR: Disconnected: No supported authentication methods available
(server sent: publickey)
It looks like I do everything correctly.
$ gcloud compute username@ssh example-instance --zone us-central1-a
Getting a warning that ssh key is going to be generated
WARNING: You do not have an SSH key for Google Compute Engine.
WARNING: [C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\bin\sdk\winkeygen.exe] will be executed to generate a key.
Updated [https://www.googleapis.com/compute/v1/projects/sharp-kayak-120708].
I get the error mentioned above
Server refused our key
FATAL ERROR: Disconnected: No supported authentication methods available (server sent: publickey)
I see the keys created on both, local machine and instance (gcloud adds them to Metadata -> SSH keys). SSH is allowed in network settings.
I have tried an alternative route described here:
same error:
No supported authentication methods available
(server sent: publickey)
Would really appreciate your ideas.
Upvotes: 4
Views: 10056
Reputation: 599
Thanks for the reports.
The problem is fixed in Cloud SDK Release 98.0.0. It includes remediation that recognizes corrupt Windows key files and regenerates them on the fly.
The problem was in google-cloud-sdk\bin\sdk\winkeygen.exe. It botched the public key modulus representation in the generated .ppk and .pub files. The ssh server then interpreted the modulus as a signed bignum and bailed.
Upvotes: 2
Reputation: 381
Thanks to George for assistance with work around: https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!topic/gce-discussion/uAPNpkBJXi4
Step by step guide here:
I'm now up and running! Looking forward to a fix that lets the "google compute ssh command work! Bug report: https://code.google.com/p/google-cloud-sdk/issues/detail?id=546
Upvotes: 2