프론트엔드/트러블 슈팅

터미널 - SSH 변경 접속시 에러 처리 방법

space.developher 2023. 2. 13. 08:37
반응형

개요

사용하던 SSH 서버 를 벗어나 다른 SSH 서버로 변경 하려고 하니 에러 메시지가 발생했다.

SSH 에 접속하려고 시도하였다.

ssh user@10.10.10.10

WARNING 메시지가 떴다.

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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 ED25519 key sent by the remote host is
SHA256:HVKjr0a...a104xne/azX/2v02.
Please contact your system administrator.
Add correct host key in /Users/cho/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /Users/cho/.ssh/known_hosts:4
Host key for 10.10.10.10 has changed and you have requested strict checking.
Host key verification failed.

원인

기존에 접속한 서버와 RSA 공유키교환 한 상태였는데, 다른 서버로 변경 되었기 때문에 경고 메시지가 발생한 것이다.

해결방법

SSH 키 를 초기화하면 간단하게 해결된다.

ssh-keygen -R <서버_경로>

아래는 예시이다.

ssh-keygen -R 10.10.10.10
반응형