https://github.com/atoms/generate-ssh-iap
Helper to generate ssh config for IAP protected instances
https://github.com/atoms/generate-ssh-iap
Last synced: over 1 year ago
JSON representation
Helper to generate ssh config for IAP protected instances
- Host: GitHub
- URL: https://github.com/atoms/generate-ssh-iap
- Owner: Atoms
- Created: 2020-09-02T09:28:30.000Z (almost 6 years ago)
- Default Branch: general
- Last Pushed: 2020-09-02T09:51:37.000Z (almost 6 years ago)
- Last Synced: 2023-04-05T06:40:51.742Z (over 3 years ago)
- Language: Go
- Homepage:
- Size: 1.95 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
## Generate ssh config for IAP protected hosts
In order to connect to Google cloud Identity aware proxy protected hosts using ssh you need to generate ssh config.
Original usage from Google cloud
```shell
gcloud compute ssh vmname
```
When configuration generated by this tool is added in configuration, you can use just
```
ssh vmname
```
## Usage:
```
go build
export GOOGLE_APPLICATION_CREDENTIALS=/path/to/service/account/credentials.json
./generate-ssh-iap -p $project -z $zone -v $vmname -u $username
```
project - where instance is located
zone - where instance is located
vmname - instance name for which to generate
username - if your instance username is different then local username
When you add ssh config you are able to use Visual studio code with `remote-ssh` extension
Original howto source:
https://medium.com/@albert.brand/remote-to-a-vm-over-an-iap-tunnel-with-vscode-f9fb54676153