http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/managing-users.html

usually when use pem file as way to connect to a instance, it's not safe. Because when staff has left the company and he still carries the pem file and if the instance is in public subnet and publicly accessible, security will be compromised.
so that's the scenario that we need multiple user accesses to one instance.

1: launch a instance with xxx.pem
2: sudo useradd user1 then sudo su - user1
3: mkidr .ssh
4: chmod 700 .ssh
5: vi .ssh/authorized_keys then copy public key of user1 then save
6: chmod 600 .ssh/authorized_keys
7:

then user1 can use the private key to access the instance.
ssh -i gabrielwu gabrielwu@ec2.ip.ap-northeast-1.compute.amazonaws.com

最新文章

  1. nodejs连接mongodb的方法
  2. switch结构的用法
  3. BCB 中测量Richedit 的文本总行高
  4. 关于名称重整(name mangling)、多态性的一些简单介绍
  5. Networking - ARP 协议
  6. HW4.35
  7. hdoj 1686 kmp
  8. 《第一行代码》学习笔记16-碎片Fragment(1)
  9. 2008r2 做windows域控制器
  10. centos 彻底删除nodejs默认的安装文件
  11. js Checkbox 传递多个值给后台
  12. Form表单中method="post/get'的区别
  13. iOS APP开发设置启动图片 Launch Image
  14. HDU_4883
  15. 芯灵思Sinlinx A64 Linux&qt编译安装
  16. 优化读取纯真IP数据库QQWry.dat获取地区信息
  17. ***在Linux环境下mysql的root密码忘记解决方法(三种)-推荐第三种
  18. Tesseract 模块
  19. linux入门001--帮助支持
  20. Dynamic Code Evolution for Java dcevm 原理

热门文章

  1. Python 入门之 内置模块 -- datetime模块
  2. Vuejs——slot内容分发
  3. 25、Python之禅
  4. PHP trait与单例模式 (一次编写,到处使用)
  5. roll out项目中原系统自定义程序不能编辑
  6. IntelliJ IDEA 2017 提示“Unmapped Spring configuration files found.Please configure Spring facet.”解决办法
  7. 阿里服务器+Centos7.4+Tomcat+JDK部署
  8. Spring Boot自动配置总结
  9. mysql查看库、表占用存储空间大小
  10. Codeforces 981 共同点路径覆盖树构造 BFS/DP书架&最大值