0.0.1 • Published 6 years ago
@guardian/ssm-proxy v0.0.1
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-0123ade411and 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-pluginRequired 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 yesRunning 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>0.0.1
6 years ago