Reputation: 5545
There seems to be no option to connect to a compute engine instance using SSH.
Here's what I've already tried:
Cloud Console In-browser SSH
Error:
The VM guest environment is outdated and only supports the deprecated 'sshKeys' metadata item.
Cloud Shell using GCloud command
Command:
$ gcloud compute --project "reflective-data" ssh --zone "us-central1-a" "instance-1"
Error:
Permission denied (publickey).
ERROR: (gcloud.compute.ssh) [/usr/bin/ssh] exited with return code [255].
Google Cloud SDK Shell
Command:
$ gcloud compute --project "reflective-data" ssh --zone "us-central1-a" "instance-1"
Error:
[PuTTY Fatal Eroor] Disconnected: No supported authentication methods available (server sent: publickey)
After all of these failed, I also tried deleting all ssh-keys for the instance and later also for the project. The errors remain the same.
Firewall settings:
Upvotes: 0
Views: 461
Reputation: 51
Here is an alternative method that has worked for me:
In the terminal type ssh-keygen -t rsa -f ~/.ssh/{filename} -C {username}
Upload the Public Key to your VM
cat ~/.ssh/{filename}.pub
Upvotes: 0
Reputation: 107
Have you tried to create a separate SSH key pair, and then edit the GCE instance's metadata to add the public key (https://cloud.google.com/compute/docs/instances/adding-removing-ssh-keys#instance-only) and then try the connection again?
Upvotes: 0