Reputation: 41
I ran into a brick wall with this. I have granted both instances full access: Allow full access to all Cloud APIs.
I am using the following command:
gcloud compute scp [myinstancename]:/var/www /var/www --recurse --zone europe-west1-d
or
gcloud compute scp root@[myinstancename]:/var/www /var/www --recurse --zone europe-west1-d
Google Cloud Network Firewall has SSH enabled.
No matter what I have tried, I get the following error:
Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
Thanks in advance.
Upvotes: 2
Views: 1770
Reputation: 528
You need to check several things:
.ssh/google_compute_engine
Can you ssh to the instance using the gcloud command?
gcloud compute ssh [instance_name]
You should have installed the gcloud sdk, the official way to install it is detailed in Google Cloud docs here:
If you never ran a gcloud command in your local machine, you need to initialize it by running:
gcloud init
It would help if you run the gcloud ssh with some debug flags:
gcloud compute ssh [instance_name] --log-http --verbosity debug
Upvotes: 1