[ Linux ] WARNING: UNPROTECTED PRIVATE KEY FILE 문제 해결
# ssh -i testkey.pem root@server_ip The authenticity of host 'server_ip (server_ip)' can't be established. ECDSA key fingerprint is 53:36:11:29:9f:6c:70:57:26:24:95:9c:e7:8a:fe:3e. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'server_ip' (ECDSA) to the list of known hosts. @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: UNPROTECTED PRIVATE KEY FILE! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Permissions 0644 for 'testkey.pem' are too open. It is required that your private key files are NOT accessible by others. This private key will be ignored. bad permissions: ignore key: testkey.pem Permission denied (publickey). |
위와 같은 문제는 pem 파일을 가지고 ssh 로 위와 같이 접근 할 때 발생 한다.
나의 경우는 아마존 aws A -> 아마존 aws B 로 접속 할 때 발생 하였다.
원인은 pem 파일의 권한이 위에서 처럼 644 로 설정이 되어 있는데 너무 권한이
많이 풀려 있다는 얘기다. pem 파일을 600 으로 권한을 바꾸어 주면 위의 문제가
해결 된다.
#chmod 600 testkey.pem
http://naleejang.tistory.com/40 를 참고 해서 해결 하였습니다.