ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • AWS EC2 mac OS 터미널에서 접속하기
    work life/PROJECT 1. 웹 기본 2017. 5. 20. 10:58

    첫번째, key pair 다운로드!

       

    딱 한번만 다운로드 가능하다고 한다.

    잘못 저장했거나... 등등 다시 다운로드 받을 기회가 없으니 키 처음 다운로드시 잘 저장할 것!

    잃어버리면 instance를 다시 만들어야 할 수도.. AWS에서도 보관 안해준다고 합니다.




    두번째, key pair의 권한 변경하기

     

     > chmod 600 key-pair-이름.pem



    세번째, 터미널에서 접속!


    > ssh -i ~key pair 경로/key-pair-이름.pem ec2-user@ 도메인.compute-1.amazonaws.com


    Permission denied (publickey).



    어라........ permission denied?

    도메인을 ip로 변경해보고 key pair권한을 400으로 바꿨다가 600으로 바꿨다가 해봤는데도 접속 안됨.


    인터넷을 검색해보니 ubuntu로 생성할 경우 기본 user name이 ubuntu라고 하여, 다시시도


    > ssh -i ~key pair 경로/key-pair-이름.pem ubuntu@내 도메인.compute-1.amazonaws.com


    또는 


    > ssh -i ~key pair 경로/key-pair-이름.pem ubuntu@공인 IP 주소





    1.amazonaws.com

    Welcome to Ubuntu 16.04.2 LTS (GNU/Linux 4.4.0-1013-aws x86_64)


     * Documentation:  https://help.ubuntu.com

     * Management:     https://landscape.canonical.com

     * Support:        https://ubuntu.com/advantage


      Get cloud support with Ubuntu Advantage Cloud Guest:

        http://www.ubuntu.com/business/services/cloud


    0 packages can be updated.

    0 updates are security updates.




    The programs included with the Ubuntu system are free software;

    the exact distribution terms for each program are described in the

    individual files in /usr/share/doc/*/copyright.


    Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by

    applicable law.


    To run a command as administrator (user "root"), use "sudo <command>".

    See "man sudo_root" for details.


    ubuntu@ip-172-31-?-?:~




    접속 됐다 !



    'work life > PROJECT 1. 웹 기본' 카테고리의 다른 글

    [프로젝트 설명] 웹 기본 습득하기  (0) 2017.05.21
    Ubuntu에 node.js 설치하기  (0) 2017.05.20
Written by Sohina.