yeollow / return-home-safely

Apache License 2.0
1 stars 0 forks source link

AWS ssh aliasing #16

Closed yeollow closed 3 years ago

yeollow commented 3 years ago

ssh 접속

ssh [username]@[host] -i {pem경로}를 통해 접속할 수 있지만, ~/.ssh/config에 config 정보를 아래와 같이 입력해주면 지정해준 hostname을 통해 ssh hostName으로 바로 접근 할 수 있음.

Host {hostName}
    HostName {AWS ip address}
    User ubuntu
    IdentityFile ~/.ssh/{pemFileName}.pem

Host {hostName}
    HostName {AWS ip address}
    User ubuntu
    IdentityFile ~/.ssh/{pemFileName}.pem

Host {hostName}
    HostName {AWS ip address}
    User ubuntu
    IdentityFile ~/.ssh/{pemFileName}.pem

Host {hostName}
    HostName {AWS ip address}
    User ubuntu
    IdentityFile ~/.ssh/{pemFileName}.pem
yeollow commented 3 years ago

각 EC2 Server에 필요한 설정들

이후 재부팅