Download public & private keys from Google Cloud Instance

New to the cloud so pardon this question as I'm certain it's relatively simple!

I've setup my Google Cloud Instance and I'm now trying to connect to it using FileZilla. I have a good understanding of how to do this... but I've been completely unable to download my .ppk file, public key, and private keys. The documentation clearly gives the folder that the files are located in.... but I'm unable to navigate to these folders (it's as if they don't exist) furthermore I'm not really sure how to download something to my computer through the SSH terminal.

Also somewhat infuriating is that I've found the keys in the web portal on Google Cloud however there is no option to download them. I can only view them in clear text.

Any help would be greatly appreciated!


Solution 1:

Consider to use command line tools:

  1. Install Cloud SDK for your platform. This would initialize your local environment. First time you'll try to access instance via gcloud SSH/SCP functionality, Cloud SDK will generate a key locally as ~/.ssh/google_compute_engine and inject your user and public SSH key into project-level metadata. Then there is google-accounts-daemon service running by default on each Linux VM which polls project metadata, creates local users on a VM as needed and puts relevant public SSH keys into ~/.ssh/authorized_keys.

  2. Use gcloud compute scp to copy files to and from Google Compute Engine virtual machines via scp