Last active
October 21, 2022 09:47
-
-
Save dasgoll/7aed115c8f617d244c8d059acaa6ad39 to your computer and use it in GitHub Desktop.
SSH to ec2 instance using EC2 Instance Connect
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| aws ec2-instance-connect send-ssh-public-key --instance-id i-XXYYZZ --availability-zone eu-central-1c --instance-os-user ec2-user --ssh-public-key file:///home/foo/.ssh/id_rsa.pub --profile devops | |
| ssh ec2-user@PUBLIC_IP | |
| OR | |
| pip install ec2instanceconnectcli | |
| mssh ec2-user@i-XXYYZZ --profile devops | |
| ### | |
| https://aws.amazon.com/blogs/infrastructure-and-automation/securing-your-bastion-hosts-with-amazon-ec2-instance-connect/ | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment