如何使用公钥限制人们访问我的EC2 [英] How to limit people access to my EC2 with their public key

查看:121
本文介绍了如何使用公钥限制人们访问我的EC2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在EC2上工作很容易,您只需下载.pem文件,为其授予正确的权限,就可以开始使用了,但是...如果您拥有.pem文件,则可以完全访问EC2实例!!

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!!

我应该怎么做才能以可控制的方式限制人们对实例的访问人们将我的公钥传递给我,并将其添加到实例 a la Github

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

推荐答案

请遵循本文档中的步骤: http:// docs .aws.amazon.com / AWSEC2 / latest / UserGuide / managing-users.html

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

共有3个步骤:


  • 您必须为每个用户添加一个用户帐户(adduser)

  • 确保user-home / .ssh目录中有600权限(chmod)

  • 将用户公钥添加到user-home / .ssh / authorized_keys,并确保它具有700个权限(chmod)

这篇关于如何使用公钥限制人们访问我的EC2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆