ssh [username]@[host] -i {pem경로}를 통해 접속할 수 있지만, ~/.ssh/config에 config 정보를 아래와 같이 입력해주면 지정해준 hostname을 통해 ssh hostName으로 바로 접근 할 수 있음.
.pem file은 base64로 encoding된 ASCII 텍스트파일으로 개인키, 서버 인증서 및 SSL발급 요청 시 생성하는 포맷이다.
본 프로젝트에서는 AWS instance 4개를 가용하며 기본적인 config 정보는 아래와 같다.
{}안의 내용을 사용자 편의대로 기술하면 되며 pem file의 경우 AWS Instance생성 시 발급 받았던 key-pair의 private key file의 이름을 기술해야한다.
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
ssh 접속
ssh [username]@[host] -i {pem경로}
를 통해 접속할 수 있지만,~/.ssh/config
에 config 정보를 아래와 같이 입력해주면 지정해준 hostname을 통해 ssh hostName으로 바로 접근 할 수 있음.