일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- byungjoo kim
- gcOverhead
- python
- Spring
- KPT
- 김병주
- java
- handshake
- omz
- beforeunload
- alpine
- 커리어스킬
- docker
- 토이프로젝트
- zsh
- failed upgrade header
- remote
- iTerm2
- socjs
- AWS
- WebSocket
- Intellij
- GIT
- nginx
- rsa충돌
- 페이지이동경고
- SSH
- Dominic
- docker-compose
- MSA
Archives
- Today
- Total
Eyeeshot BloG
SSH 접속시 RSA 공유키 충돌 해결방법 본문
SSH 접속시 아래와 같은 메시지가 뜨면서 접속이 되지 않는다.
$ ssh pi@192.168.31.239
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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
SHA256:Z104VH+bHpL/7TGLK7yqSwETmlTWtj5k0qv75ADZUgc.
Please contact your system administrator.
Add correct host key in /Users/mzc01-dominic/.ssh/known_hosts to get rid of this message.
Offending RSA key in /Users/mzc01-dominic/.ssh/known_hosts:11
ECDSA host key for 192.168.31.239 has changed and you have requested strict checking.
Host key verification failed.
이유는 해당 IP로 기존에 접속한 적이 있는 서버와 RSA 공유키를 교환한 상태에서 해당 서버가 정보가 바뀌었기 떄문이다. (ex Os 재설치및 ssh 접속정보 삭제)
위 경고 메시지는 접속하려는 client 기기에서 기존에 알고있던 정보를 찾아서 따라갔더니 기존과는 전혀 다른 서버로 접속되었다는 것이다.
위 메시지가 나왔을 경우는 아래의 명령어로 해결하면된디.
ssh-keygen -R {해당IP}
ex) ssh-keygen -R 192.168.31.239
ssh-keygen -R {해당IP}
ex) ssh-keygen -R 192.168.31.239
해당 결과
# Host 192.168.31.239 found: line 10
# Host 192.168.31.239 found: line 11
/Users/mzc01-dominic/.ssh/known_hosts updated.
Original contents retained as /Users/mzc01-dominic/.ssh/known_hosts.old
만약 초기화하지 않고 단순히 경고를 무시하려면 아래의 옵션을 사용ㅎ해도 된다.
만약 초기화하지 않고, 단순히 경고를 무시하려면 아래의 옵션을 사용해도 된다.
ssh -o "StrictHostKeyChecking no" pi@192.168.31.239
'Tech' 카테고리의 다른 글
Synology Nas 에서 Python3 와 pip설치 (0) | 2021.01.12 |
---|---|
vi 에서 붙여넣기 했을때 탭 깨지는 현상 해결방법 (0) | 2021.01.11 |
ELB Websocket 설정 문제 (0) | 2020.12.03 |
Sping boot + websocket Hands On (0) | 2020.12.03 |
Spring WebSocket (0) | 2020.12.03 |