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
- Goto https://console.cloud.google.com/compute/instances
- Click
SSH
of specific instance - At the SSH window, select
Gear
icon on upper-right corner and selectUpload file
References: