[ Terminal ] SSH 변경 접속시 에러 처리

Space Developher·2022년 5월 31일
0

Linux

목록 보기
4/6

원인

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

ssh user@10.10.10.10

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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:HVKjr0asdbsa104xne/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.100.10 has changed and you have requested strict checking.
Host key verification failed.

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

해결

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

ssh-keygen -R <서버_경로>
  • 예시
ssh-keygen -R 10.10.100.10
profile
어제보다 오늘 더, 오늘보다 내일 더

0개의 댓글