I run gcloud auth activate-service-account --key-file=pathtokey
then I run:
gcloud compute scp sdfsdfsdfsdf.txt myinst:/tmp --zone us-east1-b
And I get this error:
WARNING: The PuTTY PPK SSH key file for gcloud does not exist.
WARNING: The public SSH key file for gcloud does not exist.
WARNING: The private SSH key file for gcloud does not exist.
WARNING: You do not have an SSH key for gcloud.
WARNING: SSH keygen will be executed to generate a key.
open C:\Windows\system32\config\systemprofile\.ssh\google_compute_engine: The system cannot find the path specified.
i don't understand, why it need access to .ssh I just gave it the path to the key
gcloud auth activate-service-account authorizes access using a service account. As with gcloud init and gcloud auth login, this command saves the service account credentials to the local system on successful completion and sets the specified account as the active account in your Cloud SDK configuration. To authorize using a service account:
As with gcloud init and gcloud auth login, this command saves the service account credentials to the local system on successful completion and sets the specified account as the active account in your Cloud SDK configuration. To authorize using a service account: Go to the Service Accounts page in the Google Cloud Console.
To authorize access without performing other setup steps: 1 Run gcloud auth login:#N#gcloud auth login#N#Or:#N#gcloud auth login --no-launch-browser#N#You can use the --no-launch-browser... 2 Follow the browser-based authorization flow to authenticate the account and grant access permissions. More ...
A service account is a Google Cloud account associated with your Google Cloud project and not a specific user. To have your application use a service account, you provide a service account key to your application.
There's a difference between the service account key and the SSH key used for an instance.
The service account key lets you access GCP. You need it to set up an SSH key.
The SSH key lets you log into a particular instance. You can only set one up if you have GCP access (for instance, via a service account key). But the SSH program works via SSH keys, so you'll need one set up.
You can change the location where the SSH key is written using the --ssh-key-file
flag. See the documentation for gcloud compute ssh
for more information.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With