Upload/Copy Files to Google VM Compute Instance

November 1, 2020

gcloud

Upload a local directory

gcloud compute scp --recurse /code/python/test VM_INSTANCE_NAME:/code/python

You can also specify specific username

gcloud compute scp --recurse /code/python/test USERNAME@VM_INSTANCE_NAME:/code/python

Upload a file

gcloud compute scp --recurse /code/python/test/main.py VM_INSTANCE_NAME:/code/python/test

Web SSH

References:

This work is licensed under a
Creative Commons Attribution-NonCommercial 4.0 International License.