multiple users to one ec2 instance setup
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的更多相关文章
- EC2 Instance扩容EBS卷容量
EC2实例运行一段时间后,由于日志和一些应用程序数据的积累,可能出现之前预留的磁盘容量不够需要扩容的情况.AWS EBS目前还不支持在线扩容,不过可以通过结合snapshot来实现. 如,我的EC2 ...
- 使用Putty连接Amazon EC2 Instance
Amazon的EC2中,默认是不允许使用用户名和密码直接连接Instance的,而是通过AWS (Amazon Web Service)提供的证书.在第一次使用EC2的时候,AWS会要求你创建一个证书 ...
- 怎样通过terminal得到AWS EC2 instance的ip
可得到private ip,也是本地的ip.事实上通过ifconfig也能得到: GET http://169.254.169.254/latest/meta-data/local-ipv4 公共ip ...
- 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 ...
- 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 ...
- 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 ...
- [AWS] Deploy react project on EC2
如何在aws部署项目 申请到亚马逊AWS免费账户后,我们可以拥有很多的免费云服务产品项目,其中包括: EC2云服务器. Amazon S3存储. Amazon RDS数据库. Amazon Cloud ...
- WCF Concurrency (Single, Multiple, and Reentrant) and Throttling
http://www.codeproject.com/Articles/89858/WCF-Concurrency-Single-Multiple-and-Reentrant-and Introduc ...
- 亚马逊 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 ...
随机推荐
- 细说vue axios登录请求拦截器
当我们在做接口请求时,比如判断登录超时时候,通常是接口返回一个特定的错误码,那如果我们每个接口都去判断一个耗时耗力,这个时候我们可以用拦截器去进行统一的http请求拦截. 1.安装配置axios cn ...
- RabbitMQ入门教程(三):Hello World
原文:RabbitMQ入门教程(三):Hello World 版权声明:本文为博主原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明. 本文链接:https://blog. ...
- Tensorflow API 学习(1)-tf.slice()
slice()函数原型为: tf.slice(input_, begin, size, name=None) 函数有4个参数: 1,input_ :图片的矩阵输入格式. 2,begin :开始截取的位 ...
- Git生成公钥.pub 及秘钥 命令
Git生成公钥.pub 及秘钥 命令 ssh-keygen -t rsa -C "******@qq.com" 将.pub公钥里面内容复制到github或者将这文件交给git管理员 ...
- Assets.xcassets的详细使用方法
开始之前,首先回顾一下iOS7初体验(1)——第一个应用程序HelloWorld中的一张图,如下所示: 本文分享一下Images.xcassets的体验~_~ 1. 打开此前使用过的HelloWorl ...
- AIX用户和组管理
1.用户登录和初始化
- python代码优化-----cpu和内存监控
1.memory_profiler可以监控代码的内存消耗及增长量,以下面的代码为例. 发现在for循环里增加了0.3MB,这个工具可以帮助我们定位内存泄露的问题. 2.profile与cProfile ...
- svn 介绍及linux下常用操作命令
1.概念 truck(主干|主线|主分支):是用来做主方向开发的,新功能的开发应放在主线中,当模块开发完成后,需要修改,就用branch. branch(分支):分支开发和主线开发是可以同时进行的,也 ...
- P5200 [USACO19JAN]Sleepy Cow Sorting 牛客假日团队赛6 D 迷路的牛 (贪心)
链接:https://ac.nowcoder.com/acm/contest/993/E 来源:牛客网 对牛排序 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 32768K,其他语言 ...
- 关于sharekey 与Open system+wep
Open_system+wep与open_system的区别在于: 对于开放系统认证,在设置时启用WEP,此时,WEP用于在传输数据时加密,对于认证没有任何作用. 抓包open_system+wep: ...