nifcloud-ssh-config

command module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

README

Build Status Go Doc Go Report Coverage Status

About

A very simple tool that generates SSH config file using NIFCLOUD Computing API.

Install

$ go get github.com/harikiriboy/nifcloud-ssh-config

or download binary here

Usage

Usage:
   [flags]

Flags:
  -h, --help                              help for this command
      --access-key string                 NIFCLOUD API ACCESS KEY (default NIFCLOUD_ACCESS_KEY_ID environment variable
      --exclude-instance-id stringSlice   List of Exclude instanceID
      --keydir string                     Location of private keys (default "~/.ssh")
      --no-identities-only                Do not include IdentitiesOnly=yes in ssh config; may cause connection refused if using ssh-agent
      --port string                       SSH port (default "22")
      --prefix string                     Specify a prefix to prepend to all host names
      --private                           Use private IP addresses (public are used by default)
      --region stringSlice                List of NIFCLOUD Regions (default all region)
      --secret-key string                 NIFCLOUD API SECRET KEY (default NIFCLOUD_SECRET_ACCESS_KEY environment variable
      --ssh-key-name string               SSH key name (default use keyName get from API response)
      --strict-hostkey-checking           Do not include StrictHostKeyChecking=no in ssh config
      --user string                       SSH username (default "root")

Example

$ nifcloud-ssh-config > ~/.ssh/config
$ cat ~/.ssh/config
Host api
  HostName 0.0.0.0
  User root
  Port 22
  IdentityFile ~/.ssh/nifcloud.pem
  IdentitiesOnly yes
  StrictHostKeyChecking no

Host web
  HostName 0.0.0.0
  User root
  Port 22
  IdentityFile ~/.ssh/nifcloud.pem
  IdentitiesOnly yes
  StrictHostKeyChecking no

Host db
  HostName 0.0.0.0
  User root
  Port 22
  IdentityFile ~/.ssh/nifcloud.pem
  IdentitiesOnly yes
  StrictHostKeyChecking no

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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