Access to EC2

i created an EC2 Linux instance and downloaded a PEM key. I have two developers that need to access this instance using SSH.

Should I give them my PEM key? What happens if they left as they are just a contractor?

How do manage this kind of access to instance correctly? Thanks
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Gerwin Jansen, EE MVETopic Advisor Commented:
Keep that PEM key to yourself, don't share it. I would upload your own public key to connect:

If you provide your own key pair: You upload only your public key to AWS. You keep the private key. The public key must be an RSA key in PEM format. When you upload the public key, we give you a key pair ID to use in your CloudFront-signed URLs.
More details here:
Shalom CarmelCTOCommented:
a. Create a new SSH key.

b. Create a new user, give it the permissions it needs.

c. Place the new SSH public key into the ~/.ssh/authorized_keys of the new user. The public key looks something like
ssh-rsa AAAAB....lots.of.text......VKFA7Xf Key description  The file and the .ssh directory need 600 authority and need to be owned by the new user.

d. Create a private AMI

e. Send the new ssh private key and the user name to your contractors

If they leave - disable the user.
If they f**k up - you have the private AMI backup before their work.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.