#通过实例1:vpc_test_EC2_01访问实例2:vpc_test_EC2_2无法访问,提示密钥权限太大
[ec2-user@ip-10-0-1-66 ~]$ ssh -i yanyongx.pem ec2-user@10.0.2.240
The authenticity of host '10.0.2.240 (10.0.2.240)' can't be established.
ECDSA key fingerprint is SHA256:eGdqS2OUREkRuHAF7UNylbEVfTd4f62NwGukuHFRI3o.
ECDSA key fingerprint is MD5:30:03:b0:3f:31:bf:e7:0a:62:54:ba:cc:0e:34:2a:91.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '10.0.2.240' (ECDSA) to the list of known hosts.
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0664 for 'yanyongx.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 "yanyongx.pem": bad permissions
Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
#更改密钥权限,访问正常
[ec2-user@ip-10-0-1-66 ~]$ chmod 400 yyx2.pem
[ec2-user@ip-10-0-1-66 ~]$ ssh -i yyx2.pem ec2-user@10.0.2.209
__| __|_ )
_| ( / Amazon Linux 2 AMI
___|\___|___|
19 package(s) needed for security, out of 31 available
Run "sudo yum update" to apply all updates.