DEV Community

Cover image for Manage SSH access with AWS IAM
Ezequiel Esnaola
Ezequiel Esnaola

Posted on • Updated on


Manage SSH access with AWS IAM

When I started working at my current job I found that all the developers used the same key to access all the servers by ssh.

Looking for a solution I found a script that synchronizes the ssh keys with the users of IAM.

The problem was that all our infrastructure was based on Elastic Beanstalk and the solution was designed for EC2. If it was installed manually as in EC2 it would be erased when the instance is rebuilt.

To solve this problem, create a script that installs the package after each deploy (in case it is not installed previously) and then configure it.

To use this script it is necessary to save it in the .ebextensions folder and then make a new build.

Update June 2019: Check out Amazon EC2 Instance Connect as a replacement for this script.

For more documentation see the GitHub repository.

Top comments (2)

piyushrajsony profile image

i am not able to access it . getting no supported authentication methods available (server sent: publickey

eesnaola profile image
Ezequiel Esnaola

Update June 2019
Check out Amazon EC2 Instance Connect as a replacement for this script.

18 Useful Github Repositories Every Developer Should Bookmark

18 Useful GitHub repositories every developer should bookmark: everything from learning resources and roadmaps to best practices, system designs, and tools.