Reputation: 31
I would like to use gcloud compute ssh
with portforwarding options in windows. When I executed following command in "Google Cloud SDK Shell" shortcut on desktop, it worked.
Welcome to the Google Cloud CLI! Run "gcloud -h" to get the list of available commands.
---
C:\Program Files (x86)\Google\Cloud SDK>gcloud compute ssh instance-name --tunnel-through-iap -- -L xxxx:localhost:vvvv
C:\Program Files (x86)\Google\Cloud SDK>
But when I executed same command in powershell, it failed.
PS C:\Users\xxxx> gcloud compute ssh instance-name --tunnel-through-iap -- -L xxxx:localhost:vvvv
ERROR: (gcloud.compute.ssh) unrecognized arguments:
-L
xxxx:localhost:vvvv
To search the help text of gcloud commands, run:
gcloud help -- SEARCH_TERMS
How can I pass SSH args to gcloud command in powershell? I could not use past command history in "Google Cloud SDK Shell" shortcut, so I would like to use powershell (in which I can use past command history). Thanks.
Upvotes: 1
Views: 2419