How to limit people access to my EC2 with their public key

人盡茶涼 提交于 2019-12-08 05:28:48

问题


Working on EC2 is a snap, you just download the .pem file, give it the right permissions, and you are ready to go, yet ... if you have the .pem file you have full access to the EC2 instance!!

What shall I do to limit people's access to the instance in a controllable way, e.g. people pass me their public key and add it to the instance a la Github


回答1:


Follow the steps in this document: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/managing-users.html

There are 3 steps:

  • You have to add a user account (adduser) for each user
  • Make sure the user-home/.ssh dir has 600 permission (chmod)
  • Add the user public key to user-home/.ssh/authorized_keys and make sure it has 700 permission (chmod)


来源:https://stackoverflow.com/questions/34250659/how-to-limit-people-access-to-my-ec2-with-their-public-key

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!