Score:0

Changing or updating the passphrase in gcp lamp vm

kp flag

I am trying to download files from a particular folder from one of my vm's on gcp using the following command

gcloud compute scp --recurse VM_NAME:REMOTE_DIR LOCAL_DIR

After running the command the gcp terminal asks me for a passphrase.

I enter the passphrase and get a message saying

ERROR: (gcloud.compute.scp) [/usr/bin/scp] exited with return code [1].

My qs: How do I change or update the passphrase?

Note: The passphrase was set by running the following command: gcloud auth login

What I have already done?

  • Tried restarting and reloading apache2.
  • Searched online for the issue using popular search engines.
  • The solution mentioned here How do I change my private key passphrase? will not work because it asks for the old passphrase to change it
Wojtek_B avatar
jp flag
Can you describe how exactly did you set the passphrase ? Are you connecting from your local machine or some other VM in the same VPC ?
user4540741 avatar
kp flag
By running this command gcloud compute scp --recurse VM_NAME:REMOTE_DIR LOCAL_DIR on the lamp vm terminal
John Hanley avatar
cn flag
The command `gcloud auth login` does not set the passphrase for a VM. Google Cloud VMs do not use passphrases. They use SSH keypairs.
user4540741 avatar
kp flag
if you run gcloud auth login in the VM terminal it will show a link, if you click on the link it will share an alphanumeric code which you need to copy and enter in the terminal. It then asks if the zone and the project id are accurate, after that it asks for a passphrase and in this step, it has 2 options one for entering a passphrase or to keep it blank. You can fire up a lamp VM and check for yourself.
John Hanley avatar
cn flag
You are confusing Google Cloud Authorization with SSH server authorization. Google Cloud VMs are assigned a service account. There is no need to run the command `gcloud auth login` unless you want to use different credentials. Sometimes reading the documentation will help you use a service effectively.
user4540741 avatar
kp flag
You can try for your self and see , the question is how do I change the passphrase? Without the passphrase I cannot run the gcloud compute scp --recurse VM_NAME:REMOTE_DIR LOCAL_DIR command on the lamp vm terminal
Score:1
jp flag

You have an issue with a proper ssh-key authorization. You may actually try the gcloud compute config-ssh first but I'd advise to go through the answers and documentation first to understand what you're doing.

I've found two answers for a similar questions that may help you:

Also have a look at the documentation that describes authorising ssh to your VM's:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.