[AWS 연결오류] Permissions 0644 for 'pem' are too open

EC2 서비스로 신규 nexus 서버를 추가하기 위해 사내 aws 권한중 ec2 관련 권한을 받아 서버 인스턴스를 구축중에 위와 같은 에러를 만났습니다.

 

좀더 자세히는 아래와 같습니다.

 

WARNING: UNPROTECTED PRIVATE KEY FILE!

Permissions 0644 for 'nexus.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 "nexus.pem": bad permissions
ec2-user@ec2-n-nn-nn-n.ap-northeast-2.compute.amazonaws.com: Permission denied (publickey,gssapi-keyex,gssapi-with-mic).

 

내용을 훑어 봤을때는 신규로 발급받은 pem 키에 대한 open이 너무 과하게 열려있다는 뜻 같은데.. 사실 영문이라 무슨 뜻인 줄 확실히 알지는 못했다.

 

좀더 서칭을 해봤고 관련 키워드 및 해결방법을 정리한 stackoverflow를 확인하고 나서 open에 대한 의미를 알 수 있었다.

 

open이란 단어를 파일의 접근 권한으로 생각하면 authorization으로 번역이 될 수 있었다. aws에서 생각보다 추상적인 워딩으로 쓴건지.. 초다국적 기업이기 때문에 쉬운 용어로 접근하기위해서 작성한건지.. 내가 영어가 그냥 꽝인건지..ㅠㅠ

 

따라서 단순히 pem 파일의 권한을 아래와 같이 수정해주었다.

chmod 400 nexus.pem

 

 

 

 

 

 

 

이슈발생의 원인이 다양하게 많은 인프라의 구성환경에서 도움이 되었으면 좋겠습니다.

 

이슈를 해결하는데 참고했던 스택오버플로우 경로는 아래와 같다.

 

https://stackoverflow.com/questions/29933918/ssh-key-permissions-0644-for-id-rsa-pub-are-too-open-on-mac

 

SSH Key: “Permissions 0644 for 'id_rsa.pub' are too open.” on mac

I generate a ssh key pair on my mac and add the public key to my ubuntu server(in fact, it is a virtual machine on my mac),but when I try to login the ubuntu server,it says: @@@@@@@@@@@@@@@@@@@@@@...

stackoverflow.com

 

댓글

Designed by JB FACTORY