ssm-sh

command module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2018 License: MIT Imports: 12 Imported by: 0

README

SSM shell

Build Status

Little experiment to mimic SSH by using SSM agent to send commands to remote instances and fetching the output.

Usage

$ dep ensure
$ go install

$ ssm-sh --help

Usage:
  ssm-sh [OPTIONS]

Application Options:
  -p, --profile=   AWS Profile to use. (If you are not using Vaulted).
  -r, --region=    Region to target. (default: eu-west-1)
  -f, --frequency= Polling frequency (millseconds to wait between requests). (default: 500)
  -t, --timeout=   Seconds to wait for command result before timing out. (default: 30)

Help Options:
  -h, --help       Show this help message

Example

$ vaulted -n lab-admin -- ssm-sh

[INFO] 2018/01/27 16:12:22 AWS credentials loaded
Instance ID          | Platform             | Version | IP             | Last pinged
i-02162678c46646813  | Amazon Linux         | 2.0     | 172.32.18.168  | 2018-01-27

$ Chose target (instance id): i-02162678c46646813
[INFO] 2018/01/27 16:12:57 Targeting: 'i-02162678c46646813'

$ ps aux | grep agent
root       316  0.0  0.0   9152   920 ?        S    15:13   0:00 grep agent
root      3261  0.0  1.8 234052 18608 ?        Ssl  12:56   0:02 /usr/bin/amazon-ssm-agent

$ echo $HOSTNAME
ip-172-32-18-168.eu-west-1.compute.internal

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