Last active
September 6, 2018 14:23
-
-
Save joaoluiznaufel/c0b4afdc55a806ba5d4af597838ccd6e to your computer and use it in GitHub Desktop.
gcloud commands
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#get all the compute instances | |
gcloud compute instances list | |
#start a ssh connection | |
gcloud compute ssh mongo --zone us-west1-b | |
#using scp to send files recursive | |
gcloud compute scp ~/path/file <instance name>:/path/file --zone us-west1-b --recurse | |
#create ssh tunnel | |
gcloud compute ssh --zone <your zone> <instance name> -- -f -N -L <local_port>:localhost:<remote_port> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment