An open API service indexing awesome lists of open source software.

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

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