@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>

    Keywords

    none

    Install

    npm i @guardian/ssm-proxy

    DownloadsWeekly Downloads

    2

    Version

    0.0.1

    License

    Apache-2.0

    Unpacked Size

    19.2 kB

    Total Files

    6

    Last publish

    Collaborators

    • unmesh_malvankar
    • zekehg
    • rtyley
    • dlawes
    • ghaberis
    • jsherbert
    • david.furey.gu
    • tonymccraeguardian
    • jlieb10
    • guardian-developers
    • simonadcock-gu
    • maxspencer
    • akash1810
    • reetta
    • ajwl
    • tomrf1
    • mchv
    • itsibitzi
    • justinpinner
    • jranks123
    • nicl
    • philmcmahon
    • tjmw
    • thaliasilver
    • sndrs
    • sam.hession
    • jfsoul
    • 0x101
    • frankie_hammond
    • aoifemcl15
    • ioanna0
    • mxdvl
    • rhysmills
    • jamie-lynch
    • amyhughes-gu
    • oliverlloyd
    • jacobwinch
    • dskamiotis
    • marjank
    • annabeddow
    • fweddi
    • michaelclapham_gnm
    • olly.namey.guardian