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

posted @ 2017-09-09 07:16 IamThat 阅读(174) 评论(0) 推荐(0) 编辑
摘要: 原因 即使在控制台创建 创建的alarm会在us-east-1 不会再其他区域,目前route53 metric 在其他区域不存在。 所以使用cloudformation 创建 route53 health check,请选择us-east-1 阅读全文
posted @ 2017-06-16 19:28 IamThat 阅读(249) 评论(0) 推荐(0) 编辑
摘要: How to use aws ec2 pem http://www.anthonychambers.co.uk/blog/rsync-to-aws-ec2-using-.pem-key/9 方法如下: -rave "ssh -i PEMKEYFILE.pem" 阅读全文
posted @ 2017-05-26 15:15 IamThat 阅读(502) 评论(0) 推荐(0) 编辑
摘要: jstack -l jvm_pid 运行以下代码之后运行上面命令,可以在控制台上看到死锁。 阅读全文
posted @ 2017-03-06 00:02 IamThat 阅读(2291) 评论(0) 推荐(0) 编辑
摘要: 一个庙里, 三个和尚,只有一个碗, 三个和尚都要吃饭,所以每次吃饭的时候, 三个和尚抢着碗吃。 package interview.java.difference.l05; public class WaitAndNotifyAndNotifyAll { static class Bowl{ pri 阅读全文
posted @ 2017-02-27 16:48 IamThat 阅读(581) 评论(0) 推荐(0) 编辑
摘要: Topics which I read based on the previous forum discussions Amazon DynamoDB January 2016 Day at the SF Loft - DynamoDB Design Patterns and Best Practi 阅读全文
posted @ 2016-11-28 21:58 IamThat 阅读(265) 评论(0) 推荐(0) 编辑
摘要: Unknown Endpoint: Inaccessible host: `dynamodb.us-east-1.amazonaws.com' 别慌!Docker容器内不能联网的6种解决方案 注:下面的方法是在容器内能ping通公网IP的解决方案,如果连公网IP都ping不通,那主机可能也上不了网( 阅读全文
posted @ 2016-11-17 22:13 IamThat 阅读(1000) 评论(0) 推荐(0) 编辑
摘要: 参照这篇文章 http://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/loading-node-credentials-shared.html You can keep your AWS credentials data in 阅读全文
posted @ 2016-11-17 21:39 IamThat 阅读(521) 评论(0) 推荐(0) 编辑
摘要: if first time to install docker, be noted the docker engine started as root copied from: http://blog.163.com/s2006203387@126/blog/static/5331995720151 阅读全文
posted @ 2016-11-10 00:32 IamThat 阅读(7502) 评论(1) 推荐(0) 编辑
摘要: first: create counter collection in mongodb:> db.counters.insert({_id:"entityId",seq:0})WriteResult({ "nInserted" : 1 }) then put below in a model.js: 阅读全文
posted @ 2016-07-13 22:19 IamThat 阅读(8667) 评论(0) 推荐(0) 编辑
点击右上角即可分享
微信分享提示