Home gcp---ssh-via-iap
Post
Cancel

gcp---ssh-via-iap

Tunnelling

Ensure your pub key is uploaded to GCP

gcloud compute os-login ssh-keys add --key-file=

In one window, create the tunnel

gcloud beta compute start-iap-tunnel ` 22 --local-host-port=localhost:2222 --project `

In another terminal;

 ssh localhost -p 2222 -A -i 

Direct over IAP tunnel

gcloud compute ssh ` --project `` --zone=`` --tunnel-through-iap --strict-host-key-checking=no`

This post is licensed under CC BY 4.0 by the author.