[Linux]SSH 접속 에러(WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!)
가끔 SSH를 연결하다가 아래와 같은 메시지를 보여줄 때가 있습니다.
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 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-keygen -R [ IP or DomainName] |
위에 명령어를 사용 후 다시 SSH 접속을 재시도하면 문제없이 작동이 되는 것을 볼 수 있습니다.