SSH 원격 접속시 RSA 공유키 충돌 에러

2022. 1. 24. 17:41운영체제/Linux

AWS 서버에 ssh 원격 접속을 하려는데 오류가 발생했다. (Putty 사용)

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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:*****.
Please contact your system administrator.
Add correct host key in /home/{계정명}/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /home/{계정명}/.ssh/known_hosts:191
ECDSA host key for 10.107.***.*** has changed and you have requested strict checking.
Host key verification failed.

위와 같은 오류가 발생할 경우 아래 방법으로 해결하면 된다.

 

 

 

1. known_hosts의 내용을 갱신

$ ssh-keygen -R 10.107.***.***

 

2. 갱신 이후 서버에 다시 접속

$ ssh 10.107.***.***
The authenticity of host '10.107.***.*** (10.107.***.***)' can't be established.
ECDSA key fingerprint is SHA256:*****.
ECDSA key fingerprint is MD5:*****.
Are you sure you want to continue connecting (yes/no)?

연결을 계속 하겠냐고 내용이 나오면 yes를 치고 접속하면 된다.

 

 

'운영체제 > Linux' 카테고리의 다른 글

Linux lsblk, df 명령어 비교  (0) 2021.04.28
Linux ipcs 명령어  (0) 2021.04.28
Linux df, du 명령어  (0) 2021.02.15
Linux 기본 명령어  (0) 2020.09.30