https://github.com/deviavir/gcp-ssh-config
gcp-ssh-config
https://github.com/deviavir/gcp-ssh-config
Last synced: over 1 year ago
JSON representation
gcp-ssh-config
- Host: GitHub
- URL: https://github.com/deviavir/gcp-ssh-config
- Owner: DeviaVir
- Created: 2018-07-05T11:34:07.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-07-05T11:39:01.000Z (about 8 years ago)
- Last Synced: 2025-02-07T18:31:43.005Z (over 1 year ago)
- Language: Python
- Size: 1.95 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# gcp-ssh-config
Adds all instances in all projects that your user has access to, to your local `~/.ssh/config`. This allows you to use tab autocompletion when `ssh`-ing to a host.
This is only useful if you're trying to autocomplete the `.internal` dns name.
### Set up
Make sure you are authenticated with gcloud:
```
$ gcloud auth application-default login
```
Run `gcp-ssh-config`:
```
$ pip install -r requirements.txt
$ ./gcp-ssh-config.py # this might take a while depending on how many projects you have
$ cat ~/.ssh/config # make sure it worked
$ ssh [instance-name][tab]
```
You can safely run `gcp-ssh-config.py` again and again, the list will be cleared and filled with detected hosts.