Skip to content

pengux/do2sshconfig

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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 page, then extract and run:

./do2sshconfig [PAT] >> ~/.ssh/config

or better yet, install Go and then you can clone and run it:

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:

sed '/# --- DigitalOcean hosts - Start ---/,/# --- DigitalOcean hosts - End ---/d' ~/.ssh/config > /tmp/ssh_config && mv /tmp/ssh_config ~/.ssh/config

Options

./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")

About

Command line tool to create an entry in your ~/.ssh/config for each of your DigitalOcean droplets

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages