오지's blog

AWS EC2처음 접속시 permission 에러 본문

개발노트/서버 관리

AWS EC2처음 접속시 permission 에러

오지구영ojjy90 2022. 3. 20. 21:42
728x90
반응형

(base) yjjo@yjjo-macpro workspaces % ssh -i websrv.pem ubuntu@54.180.135.135.208

ssh: Could not resolve hostname 54.180.135.135.208: nodename nor servname provided, or not known

(base) yjjo@yjjo-macpro workspaces % ssh -i websrv.pem ubuntu@54.180.135.208   

The authenticity of host '54.180.135.208 (54.180.135.208)' can't be established.

ED25519 key fingerprint is SHA256:mJIFI7WbfyMg7MYmEf/bdAJAs+Y+dpWNhaEnqDB7k9Y.

This key is not known by any other names

Are you sure you want to continue connecting (yes/no/[fingerprint])? yes

Warning: Permanently added '54.180.135.208' (ED25519) to the list of known hosts.

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

@         WARNING: UNPROTECTED PRIVATE KEY FILE!          @

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

Permissions 0644 for 'websrv.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 "websrv.pem": bad permissions

ubuntu@54.180.135.208: Permission denied (publickey).

(base) yjjo@yjjo-macpro workspaces % ls

dataeng websrv.pem

(base) yjjo@yjjo-macpro workspaces % chmod 400 ~/workspaces/websrv.pem 

(base) yjjo@yjjo-macpro workspaces % ssh -i websrv.pem ubuntu@54.180.135.208

 


해결책 - 키파일에 permission부과

 chmod 400 ~/srv.pem 

Comments