ssh fingerprint삭제 하기

이태혁·2021년 1월 21일
0

ssh로 접속했을 때 fingerprint를 사용해 접속할거냐고 물을때가 있다.
이때 한번 사용한 fingerprint가 계속해서 사용하게 되는데

추후에 접속이 재설정되어도 fingerprint는 컴퓨터에 남아있기때문에 삭제해주지 않으면 아래와 같은 에러 메세지가 뜬다.

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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
...

이때 fingerprint를 초기화해주기 위해서는 아래와 같은 명령어를 치면 된다.

ssh-keygen -R 주소(ip 혹은 도메인주소)
#예
ssh-keygen -R 192.168.0.1

출처: https://www.cyberciti.biz/faq/mac-os-x-remove-known-host/

profile
back-end, cloud, docker, web의 관심이 있는 예비개발자입니다.

0개의 댓글