aws-ec2-ssh | Manage AWS EC2 SSH access with IAM | AWS library
kandi X-RAY | aws-ec2-ssh Summary
kandi X-RAY | aws-ec2-ssh Summary
June 2019: Check out Amazon EC2 Instance Connect as a replacement for this project. September 2018: Check out AWS Systems Manager Session Manager as a replacement for this project. Use your IAM user's public SSH key to get access via SSH to an EC2 instance running. aws-ec2-ssh depends on the AWS CLI and git if you use the install.sh script.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of aws-ec2-ssh
aws-ec2-ssh Key Features
aws-ec2-ssh Examples and Code Snippets
Community Discussions
Trending Discussions on aws-ec2-ssh
QUESTION
I am trying to follow this guid but it looks like the stack may be missing some information. I am trying to create this in eu-west-2
https://cloudonaut.io/manage-aws-ec2-ssh-access-with-iam/
It errors with “Template validation error: Template error: Unable to get mapping for RegionMap::eu-west-2::AMI”
UPDATE
should the region map look like this?
...ANSWER
Answered 2021-Feb-22 at 13:15That blog is almost 5 years old, eu-west-2
didn't exist back then, it was launched publicly in December 2016 and the blog is from April 2016.
According to the template that's linked, these are the supported regions:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install aws-ec2-ssh
Upload your public SSH key to IAM: Open the Users section in the IAM Management Console Click the row with your user Select the Security Credentials tab Click the Upload SSH public key button at the bottom of the page Paste your public SSH key into the text-area and click the Upload SSH public key button to save
Attach the IAM permissions defined in iam_ssh_policy.json to the EC2 instances (by creating an IAM role and an Instance Profile)
Install the RPM1: rpm -i https://s3-eu-west-1.amazonaws.com/widdix-aws-ec2-ssh-releases-eu-west-1/aws-ec2-ssh-1.9.2-1.el7.centos.noarch.rpm
The configuration file is placed into /etc/aws-ec2-ssh.conf
The RPM creates a crontab file to run import_users.sh every 10 minutes. This file is placed in /etc/cron.d/import_users
Upload SSH public key. Upload SSH public key.
Upload your public SSH key to IAM: Open the Users section in the IAM Management Console Click the row with your user Select the Security Credentials tab Click the Upload SSH public key button at the bottom of the page Paste your public SSH key into the text-area and click the Upload SSH public key button to save
Attach the IAM permissions defined in iam_ssh_policy.json to the EC2 instances (by creating an IAM role and an Instance Profile)
Run the install.sh script as root on the EC2 instances. Run install.sh -h for help.
The configuration file is placed into /etc/aws-ec2-ssh.conf
Connect to your EC2 instances now using ssh $Username@$PublicName with $Username being your IAM user, and $PublicName being your server's name or IP address
Role for Cross-Account Access. Provide access between AWS accounts you own.
In the users account, create a new IAM role
Select Role Type Role for Cross-Account Access and select the option Provide access between AWS accounts you own
Put the dev account number in Account ID and leave Require MFA unchecked
Skip attaching a policy (we will do this soon)
Review the new role and create it
Select the newly created role
In the Permissions tab, expand Inline Policies and create a new inline policy
Select Custom Policy
Paste the content of the iam_ssh_policy.json file and replace <YOUR_USERS_ACCOUNT_ID_HERE> with the AWS Account ID of the users account.
For your EC2 instances, you need a IAM role that allows the sts:AssumeRole action.
In the dev account, create a new IAM role
Select ROle Type AWS Service Roles and select the option Amazon EC2
Skip attaching a policy (we will do this soon)
Review the new role and create it
Select the newly created role
In the Permissions tab, expand Inline Policies and create a new inline policy
Select Custom Policy
Paste the content of the iam_crossaccount_policy.json file and replace <YOUR_USERS_ACCOUNT_ID_HERE> with the AWS Account ID of the users account and <YOUR_USERS_ACCOUNT_ROLE_NAME_HERE> with the IAM rol name that you created in the users account
Create/edit the file /etc/aws-ec2-ssh.conf and add this line: ASSUMEROLE="IAM-ROLE-ARN or run the install.sh script with the -a argument
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page