본문 바로가기

TIL/잡다한

[AWS] "UNPROTECTED PRIVATE KEY FILE!" Error using SSH into Amazon EC2 Instance

반응형

ssh key를 활용하여 ec2에 접속하려고 하는데 아래와같은 에러문이 발생

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@         WARNING: UNPROTECTED PRIVATE KEY FILE!          @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0644 for 'mwaa-bastion.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 "mwaa-bastion.pem": bad permissions

잘 아시는분께 질문하니 이러한 ssh key는 권한을 축소해야지만 연결이 된다고 하셔서 찾아보니 아래와같은 글이 있었음

https://stackoverflow.com/questions/8193768/unprotected-private-key-file-error-using-ssh-into-amazon-ec2-instance-aws

 

"UNPROTECTED PRIVATE KEY FILE!" Error using SSH into Amazon EC2 Instance (AWS)

This is probably a stupidly simple question to some :) I've created a new linux instance on Amazon EC2, and as part of that downloaded the .pem file to allow me to SSH in. When I tried to ssh wi...

stackoverflow.com

 

따라서, 아래와같이 권한 조정을해주니 정상적으로 접속이 되는것을 확인함

chmod 400 mwaa-bastion.pem

 

반응형