Last active
January 29, 2022 22:46
-
-
Save jjo/a19d19e589f8db6fa6faacda7128f36e to your computer and use it in GitHub Desktop.
Revisions
-
jjo revised this gist
Jan 28, 2022 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -7,4 +7,6 @@ $ rsync vm-name.us-central1-a.some-project.gcp: # SSH agent forwarding ftW $ ssh -A vm-name.us-central1-a.some-project.gcp ## At VM prompt: vm-name $ git clone git@github:foo/private-repo -
jjo revised this gist
Jan 28, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ ### Add below stanza to your ~/.ssh/config ## Parsed as vmname.REGION.PROJECT.gcp Host *.*.*.gcp ProxyCommand gcloud beta compute ssh --tunnel-through-iap $(echo %h|awk -v FS=. '{ printf ("--project=%%s --zone=%%s %%s", $3, $2, $1) }') --command="nc -q0 localhost 22" -
jjo created this gist
Jan 28, 2022 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,4 @@ ### Add below stanza to your ~/.ssh/config ## Parsed as vmname.REGION.PROJECT.gcp Host *.*.*.gcp ProxyCommand gcloud beta compute ssh --tunnel-through-iap $(echo %h|awk -v FS=. '{ printf ("--project=%%s --zone=%%s %%s", $3, $1, $1) }') --command="nc -q0 localhost 22" This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ # Plain ssh against some VM (replace vm-name, some-project names below) $ ssh vm-name.us-central1-a.some-project.gcp uname -r 4.19.0-18-cloud-amd64 # Or use any other ssh- backed tool, e.g:. $ rsync vm-name.us-central1-a.some-project.gcp: # SSH agent forwarding ftW $ ssh -A vm-name.us-central1-a.some-project.gcp vm-name $ git clone git@github:foo/private-repo