@guardian/ssm-proxy

0.0.1 • Public • Published

ssm-proxy

Intermediate between ssh (via ProxyCommand) and AWS ssm start-session using the AWS-StartSSHSession document. Uploads your id_rsa.pub to the instance and then ensures it is deleted after 30 seconds, following the model from ssm-scala.

In practice this means you can run:

ssh i-0123ade411

and it will magically connect you, providing you have AWS credentials for the correct Janus profile.

Installation

Requires the AWS Session Manager Plugin.

There is a homebrew tap for Mac users:

brew tap dkanejs/aws-session-manager-plugin
brew install aws-session-manager-plugin

Required SSH configuration (~/.ssh/config):

host i-* mi-*
    ProxyCommand sh -c "ssm-proxy %h"
    IdentityFile /tmp/ssm-proxy-identity
    UserKnownHostsFile /tmp/ssm-proxy-known-hosts
    StrictHostKeyChecking yes

Running locally

Set up the SSH configuration as above:

# Do a build
npm run build

# Link once to make the build available on your PATH
npm link

npm run build && ssh ubuntu@i-<AWS Instance Id>

Readme

Keywords

none

Package Sidebar

Install

npm i @guardian/ssm-proxy

Weekly Downloads

0

Version

0.0.1

License

Apache-2.0

Unpacked Size

19.2 kB

Total Files

6

Last publish

Collaborators

  • joecowton1
  • guardian-developers
  • akash1810
  • reetta
  • sndrs
  • mxdvl