I\'m having a hard time copying files over to my Google Compute Engine. I am using an Ubuntu server on Google Compute Engine.
I\'m doing this from my OS X terminal a
This is to copy files from remote machine to your machine. And make sure you have ssh setup because this will use default ssh keys. This worked for me:
gcloud compute scp 'username'@'instance_name':~/source_dir /destination_dir --recurse
This is the generic syntax, so if you want to copy files from your machine to remote machine, you can use this. --recurse : required to copy directories with other files inside
Syntax: gcloud compute scp 'SOURCE' 'DESTINATION'
NOTE: run it without root