AWS

[MacOS]AWS Key Pair Error

easysheep 2023. 10. 11. 10:55

1. 오류

다음과 같이 ssh 연결을 할려고 하니 다음과 같은 오류가 발생 하였다.

 ssh -i Desktop/ssh/team4_key_pair.pem ubuntu@myip

 

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@         WARNING: UNPROTECTED PRIVATE KEY FILE!          @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0404 for 'Desktop/ssh/team4_key_pair.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 "Desktop/ssh/team4_key_pair.pem": bad permissions
ubuntu@13.124.209.44: Permission denied (publickey).

 

2. 원인

이는 해당 team4_key_pair 파일의 권한 문제이다.

 

3. 해답

다음과 같이 소유자 만이 read ,write할 수 있게끔 권한을 주면 정상적으로 작동한다.

chmod 600 team4_key_pair.pem