Cloud/Trouble Shooting

SSH Connection Error Trouble Shooting

ISFJ 개발자의 이야기 2026. 7. 7. 20:38

이번 블로그에서는 AWS EC2를 사용할 때 가끔 발생하게 되는 SSH Connection Error Trouble Shooting 글을 작성해 보겠습니다.

 

문제 상황

가끔 인스턴스를 지우고 하는 과정에서 새 인스턴스에 접속할려고 하는 경우 아래와 같은 문제가 나게 됩니다.

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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 the RSA host key has just been changed.

The fingerprint for the RSA key sent by the remote host is

-생략-

Please contact your system administrator.

Add correct host key in /home/warren/.ssh/known_hosts to get rid of this message.

Offending key in /home/warren/.ssh/known_hosts:1

RSA host key for -생략(ip)- has changed and you have requested strict checking.

Host key verification failed

 

해결 방안

그럴 경우 아래의 사진과 같이 ssh/known_hosts 파일을 지워주게 되면 해결되게 됩니다.