工作中操作AWS EC2实例遇到的坑

1、下载了证书,登录不了AWS EC2实例。
 

Li-Worker-Pro:~ bosma_tl$ ssh -i ~/America-North.pem [email protected]
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@         WARNING: UNPROTECTED PRIVATE KEY FILE!          @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0644 for '/Users/bosma_tl/America-North.pem' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
Load key "/Users/bosma_tl/America-North.pem": bad permissions

说明pem权限不对,解决办法修改证书权限。

Li-Worker-Pro:~ bosma_tl$ chmod 400 America-North.pem

Li-Worker-Pro:~ bosma_tl$ ssh -i ~/America-North.pem [email protected]
[centos@ip-172-31-1-248 ~]$ sudo su

2、创建的EC2实例,并配置了公有ip(public ip),客户端无法ping通。

登录AWS WEB控制台管理界面,在左侧菜单栏,找到“网络与安全”下面的子菜单,“安全组”,

在安全组里面,编辑入站规则。添加类型,如果客户端ip是ip4,可以类型可以选择“所有ICMP-IPV4”,否则选择“所有ICMP-IPV6”。协议选“TCP”,端口”0-65535“,来源,”0.0.0.0/0".
 

猜你喜欢

转载自blog.csdn.net/QFYJ_TL/article/details/81382604