do2sshconfig

command module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 22, 2015 License: GPL-3.0 Imports: 5 Imported by: 0

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

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL