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

multiple users to one ec2 instance setup的更多相关文章

  1. EC2 Instance扩容EBS卷容量

    EC2实例运行一段时间后,由于日志和一些应用程序数据的积累,可能出现之前预留的磁盘容量不够需要扩容的情况.AWS EBS目前还不支持在线扩容,不过可以通过结合snapshot来实现. 如,我的EC2 ...

  2. 使用Putty连接Amazon EC2 Instance

    Amazon的EC2中,默认是不允许使用用户名和密码直接连接Instance的,而是通过AWS (Amazon Web Service)提供的证书.在第一次使用EC2的时候,AWS会要求你创建一个证书 ...

  3. 怎样通过terminal得到AWS EC2 instance的ip

    可得到private ip,也是本地的ip.事实上通过ifconfig也能得到: GET http://169.254.169.254/latest/meta-data/local-ipv4 公共ip ...

  4. Getting Private/Public IP address of EC2 instance using AWS-cli [closed]

    For private IP address: aws ec2 describe-instances --instance-ids i-b78a096f | grep PrivateIpAddress ...

  5. How to Setup a Private Proxy Server on EC2 in Under 10 Minutes

    How to Setup a Private Proxy Server on EC2 in Under 10 Minutes I’ve been slacking a bit with regular ...

  6. How do I use EC2 Systems Manager to join an instance to my AWS Directory Service domain?

    1. Create new role "EC2RoleforSSM" in AWS IAM AWS->IAM->Roles->Create role->Se ...

  7. [AWS] Deploy react project on EC2

    如何在aws部署项目 申请到亚马逊AWS免费账户后,我们可以拥有很多的免费云服务产品项目,其中包括: EC2云服务器. Amazon S3存储. Amazon RDS数据库. Amazon Cloud ...

  8. WCF Concurrency (Single, Multiple, and Reentrant) and Throttling

    http://www.codeproject.com/Articles/89858/WCF-Concurrency-Single-Multiple-and-Reentrant-and Introduc ...

  9. 亚马逊 AWS ip反向解析:Configurable Reverse DNS for Amazon EC2’s Elastic IP Addresses

    I’d like to call your attention to a new feature that we rolled out earlier this month. You can now ...

随机推荐

  1. java tomcate 启动后cmd 出现乱码

    今天windows 启动tomcat 后,出现cmd 乱码 尝试改cmd编码为UTF-8后无效,修改tomcat 注册表CodePage ,cmd 依然乱码, 后来把Conf 目录下的logging. ...

  2. 主成分分析法详解(PCA)

    引用:https://blog.csdn.net/program_developer/article/details/80632779 将n维特征映射到k维上,只保留包含绝大部分方差的维度特征,而忽略 ...

  3. ivew组件上传图片文件的功能:

    解决的问题: 1.使用view的<Upload>组件实现图片文件的上传. 2.<Upload>组件action请求地址无法到自己写的后台. 3.前台base64的图片展示. 4 ...

  4. vue组件之间通信的8种方式

    对于vue来说,组件之间的消息传递是非常重要的,下面是我对组件之间消息传递的常用方式的总结. props和$emit(常用) $attrs和$listeners 中央事件总线(非父子组件间通信) v- ...

  5. [ERROR] Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.4:install (default-cli) on project kircp-js-plan-resource: The packaging for this project did not assign a file to the bu

    结合网上的相关资料,要使用Lifecycle下的install 原因好像是Lifecycle下才会走Maven完整的phase.

  6. ceph对接openstack

    一.使用rbd方式提供存储如下数据: (1)image(glance):保存glanc中的image: (2)volume(cinder)存储:保存cinder的volume:保存创建虚拟机时选择创建 ...

  7. Spring Framework Part2 IOC

    spring serious of blog edit by 马士兵教育 IoC概念 IoC是一个概念,是一种思想,其实现方式多种多样.当前比较流行的实现方式之一是DI. 基于XML的DI Appli ...

  8. [工具] BurpSuite--快速生成CSRF POC

    我们使用工具分析出存在csrf漏洞时,可以快速生成这个请求的poc,下面我们来看看怎么快速生成 0x00 上图是通过proxy,点击action,选择上图的选项即可生成这个请求的CSRF Poc了 当 ...

  9. Codeforces 919 行+列前缀和 树上记忆化搜索(树形DP)

    A B C #include <bits/stdc++.h> #define PI acos(-1.0) #define mem(a,b) memset((a),b,sizeof(a)) ...

  10. P5018 对称二叉树题解

    题目内容链接: 那么根据题意,上图不是对称二叉树,只有节点7的子树是: 通俗来说,对称二叉树就是已一个节点x为根的子树有穿过x点的对称轴并且对称轴两边的对称点的大小也必须相等,那么这棵树就是对称二叉树 ...