All Projects → qoomon → aws-ssm-ec2-proxy-command

qoomon / aws-ssm-ec2-proxy-command

Licence: MIT License
AWS SSM EC2 SSH Proxy Command

Programming Languages

powershell
5483 projects
shell
77523 projects

Projects that are alternatives of or similar to aws-ssm-ec2-proxy-command

Aws Cost Saver
A tiny CLI tool to help save costs in development environments when you're asleep and don't need them!
Stars: ✭ 178 (+54.78%)
Mutual labels:  ec2, aws-cli
Awesome Aws
A curated list of awesome Amazon Web Services (AWS) libraries, open source repos, guides, blogs, and other resources. Featuring the Fiery Meter of AWSome.
Stars: ✭ 9,895 (+8504.35%)
Mutual labels:  ec2, aws-cli
Aws
A collection of bash shell scripts for automating various tasks with Amazon Web Services using the AWS CLI and jq.
Stars: ✭ 493 (+328.7%)
Mutual labels:  ec2, aws-cli
Gossm
💻Interactive CLI tool that you can connect to ec2 using commands same as start-session, ssh in AWS SSM Session Manager
Stars: ✭ 192 (+66.96%)
Mutual labels:  ssh, ec2
Bastillion Ec2
A web-based SSH console to execute commands and manage multiple EC2 instances simultaneously running on Amazon Web Services (AWS).
Stars: ✭ 410 (+256.52%)
Mutual labels:  ssh, ec2
Aws Gate
Better AWS SSM Session manager CLI client
Stars: ✭ 294 (+155.65%)
Mutual labels:  ssh, ec2
Aws Security Viz
Visualize your aws security groups.
Stars: ✭ 511 (+344.35%)
Mutual labels:  ec2, aws-cli
Bridgy
cloud inventory + ssh + tmux + sshfs
Stars: ✭ 374 (+225.22%)
Mutual labels:  ssh, ec2
Ec2connect
Stars: ✭ 53 (-53.91%)
Mutual labels:  ssh, ec2
Keymaker
Lightweight SSH key management on AWS EC2
Stars: ✭ 221 (+92.17%)
Mutual labels:  ssh, ec2
AppToolkit
🐘 The Front-end Env Toolkit(前端环境管理工具)
Stars: ✭ 411 (+257.39%)
Mutual labels:  ssh
sshtun
Go package to create SSH tunnels
Stars: ✭ 62 (-46.09%)
Mutual labels:  ssh
zsh-ssh-agent
Ssh-agent management for zsh
Stars: ✭ 19 (-83.48%)
Mutual labels:  ssh
kuzgun
simple, ssh based deployment tool
Stars: ✭ 16 (-86.09%)
Mutual labels:  ssh
ssh2.nim
Async SSH, SCP and SFTP client for Nim, using libssh2 wrapper [WIP]
Stars: ✭ 17 (-85.22%)
Mutual labels:  ssh
secretman
Managing secrets with Yubikey
Stars: ✭ 17 (-85.22%)
Mutual labels:  aws-cli
config
Fig's integrations with bash, zsh, fish, ssh, and tmux. Also contains Fig's installation and update scripts. Finally, this repo is the root of the .fig folder that is installed on your computer when you download Fig!
Stars: ✭ 44 (-61.74%)
Mutual labels:  ssh
installtomcataws
Install tomcat 8.x in AWS (Amazon Linux AMI)
Stars: ✭ 13 (-88.7%)
Mutual labels:  ec2
guacamole-auth-jwt
Guacamole authentication extension based on JWT.
Stars: ✭ 28 (-75.65%)
Mutual labels:  ssh
decrypt-windows-ec2-passwd
Amazon EC2 Windows Instances require you to paste in your SSH private key to decrypt the password to the instance. Although they do the decryption locally, in Javascript, I'd still prevent to do it locally... not trusting Amazon.
Stars: ✭ 52 (-54.78%)
Mutual labels:  ec2

aws-ssm-ec2-proxy-command Sparkline

Open an SSH connection to your ec2 instances via AWS SSM without the need to open any ssh port in you security groups.

ⓘ Windows users please refere to README.windows.md

Prerequisits

Install SSH Proxy Command

  • Move proxy command script aws-ssm-ec2-proxy-command.sh to ~/.ssh/aws-ssm-ec2-proxy-command.sh
  • Ensure it is executable (chmod +x ~/.ssh/aws-ssm-ec2-proxy-command.sh)
Setup SSH Config [optional]
  • Add ssh config entry for aws ec2 instances to your ~/.ssh/config. Adjust key file path if needed.
    host i-* mi-*
      IdentityFile ~/.ssh/id_rsa
      ProxyCommand ~/.ssh/aws-ssm-ec2-proxy-command.sh %h %r %p ~/.ssh/id_rsa.pub
      StrictHostKeyChecking no

Open SSH Connection

  • Ensure AWS CLI environemnt variables are set properly e.g.
    • export AWS_PROFILE=default or AWS_PROFILE=default ssh ... <INSTACEC_USER>@<INSTANCE_ID>
  • If default region does not match instance region you need to provide it
    • e.g. <INSTACEC_USER>@<INSTANCE_ID>--<INSTANCE_REGION>
SSH Command with SSH Config Setup

ssh <INSTACEC_USER>@<INSTANCE_ID>

  • e.g. ssh ec2-user@i-1234567890
SSH Command with ProxyCommand CLI Option
ssh <INSTACEC_USER>@<INSTANCE_ID> \
  -i "~/.ssh/id_rsa" \
  -o ProxyCommand="~/.ssh/aws-ssm-ec2-proxy-command.sh %h %r %p ~/.ssh/id_rsa.pub"

Alternative Implementation with ec2-instance-connect

The advantage from security perspective it that you don't need to grant ssm:SendCommand to users and there by the permission to execute everything as root. Instead you only grant ec2-instance-connect:SendSSHPublicKey permission to a specific instance user e.g. ec2-user.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].