Fall in IT.

Mac ssh 접속 에러 (WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!) 본문

기타

Mac ssh 접속 에러 (WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!)

D.Y 2016. 2. 3. 23:11


Mac ssh접속 에러 TroubleShooting.


간혹, 윈도우나 linux(centOS)에서 ssh 접속할때는 문제가 없는데,

Mac에서 가상머신 혹은 다른 시스템에 ssh 접속시 아래와 같은 오류가 발생하곤 한다.


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

@    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 RSA key sent by the remote host is

SHA256:SlILYUtIhhEnRqYWkqkVRmrrY3drX4h+m84aB58RoqE.

Please contact your system administrator.

Add correct host key in /Users/test/.ssh/known_hosts to get rid of this message.

Offending RSA key in /Users/test/.ssh/known_hosts:9

RSA host key for 192.168.25.10 has changed and you have requested strict checking.

Host key verification failed.


오류의 내용은 RSA 키가 맞지 않아서 발생하는 문제이다. 이전에 해당 IP로 접속했을때의 정보가 저장되어 있는 것이다.

윈도우에서 putty를 사용하거나 secureCRT를 사용할때는 다른 키가 들어오면 새로운 패스워드를 물어보는데, 맥의 터미널은 그렇지않기 때문에,

새로운 키를 생성해줘야 한다.


아래 명령어를 실행한다.

ssh-keygen -R 접속서버IP


명령어 실행시 호스트가 업데이트 되고, 정상적으로 실행된다.



Comments