Bastion 서버 접속

  1. 터미널 접속 후 key가 위치한 곳으로 이동 후 bastion 서버 접속

    Screen Shot 2021-10-28 at 2.30.35 AM.png

SERVER_IP는 인스턴스 내의 퍼블릭 IPv4 주소

Screen Shot 2021-10-28 at 9.57.30 PM.png

  1. 접속 후 메세지 나오면 yes 입력
The authenticity of host 'xx.xxx.xxx.xx (xx.xxx.xxx.xx)' can't be established.
ECDSA key fingerprint is SHA256:xxxxxxxxxxxxx+xxxxxxxxxxx/cY.
Are you sure you want to continue connecting (yes/no/[fingerprint])?
  1. 해당 서버 접속 확인

Screen Shot 2021-10-28 at 2.32.52 AM.png

예외 발생 (ssh was 와 같은 short 숏컷을 사용 하려고 하는데, 해당 ip가 바뀌게 되었으면 저러한 에러가 뜬다.)

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@       WARNING: POSSIBLE DNS SPOOFING DETECTED!          @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
The ECDSA host key for cvi-jenkins.o-r.kr has changed,
and the key for the corresponding IP address x.xx.xxx.xxx
is unchanged. This could either mean that
DNS SPOOFING is happening or the IP address for the host
and its host key have changed at the same time.
Offending key for IP in /Users/gump/.ssh/known_hosts:xx
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ECDSA key sent by the remote host is
SHA256:xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Please contact your system administrator.
Add correct host key in /Users/gump/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /Users/gump/.ssh/known_hosts:15
ECDSA host key for cvi-jenkins.o-r.kr has changed and you have requested strict checking.
Host key verification failed.

시 원래 있던 hostsname을 지움

sudo  ssh-keygen -f "/Users/gump/.ssh/known_hosts" -R "cvi-jenkins.o-r.kr"