Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pengux/do2sshconfig
Command line tool to create an entry in your ~/.ssh/config for each of your DigitalOcean droplets
https://github.com/pengux/do2sshconfig
Last synced: about 1 month ago
JSON representation
Command line tool to create an entry in your ~/.ssh/config for each of your DigitalOcean droplets
- Host: GitHub
- URL: https://github.com/pengux/do2sshconfig
- Owner: pengux
- License: gpl-3.0
- Created: 2015-11-21T23:48:57.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2015-11-23T06:52:23.000Z (about 9 years ago)
- Last Synced: 2024-06-20T05:12:05.957Z (7 months ago)
- Language: Go
- Size: 13.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# do2sshconfig
Command line tool to create an entry in your ~/.ssh/config for each of your DigitalOcean droplets in Go## How to use
1. Create a Personal Access Token (PAT) in your DigitalOcean account. It's recommended to give it only read-only access.2. Download a binary for your system from the [Releases](https://github.com/pengux/do2sshconfig/releases) page, then extract and run:
```sh
./do2sshconfig [PAT] >> ~/.ssh/config
```or better yet, install [Go](https://golang.org/doc/install) and then you can clone and run it:
```sh
git clone https://github.com/pengux/do2sshconfig.git
cd do2sshconfig
go build
./do2sshconfig [PAT] >> ~/.ssh.config
```### Update
If you want to update the entries with new ones, make a backup first and then you can remove the old entries with this command:
```sh
sed '/# --- DigitalOcean hosts - Start ---/,/# --- DigitalOcean hosts - End ---/d' ~/.ssh/config > /tmp/ssh_config && mv /tmp/ssh_config ~/.ssh/config
```## Options
```sh
./do2sshconfig -h
Usage of ./do2sshconfig:
-idFile string
Path of private SSH key to use
-ipv6
Use IPv6 instead of IPv4 as hostnames where possible
-user string
Use a different user instead of 'root' (default "root")
```