Hello World

Be Happy!

permissions 0644 for 'keypair.pem' are too open


Permissions 0644 for pem are too open.

% ssh -i "key.pem" ec2-user@ec2.amazonaws.com

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@         WARNING: UNPROTECTED PRIVATE KEY FILE!          @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0644 for 'key.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 "key.pem": bad permissions
ec2-user@ec2.amazonaws.com: Permission denied (publickey,gssapi-keyex,gssapi-with-mic).

Solution
% chmod 400 key.pem 
% ls -la
total 56
drwxr-xr-x  10 staff  staff   320 Sep  9 11:42 .
drwx------@ 18 staff  staff   576 Sep  9 09:46 ..
-r--------@  1 staff  staff  1704 Sep  9 11:42 key.pem
% ssh -i key.pem ec2-user@ec2.compute.amazonaws.com 


       __|  __|_  )
       _|  (     /   Amazon Linux 2 AMI
      ___|\___|___|

https://99robots.com/how-to-fix-permission-error-ssh-amazon-ec2-instance/
#aws (11) #aws-troubleshooting (1)
List