-
find and remove different ssh host keyComputer/linux 2014. 7. 8. 13:53
Once I try to connect a fresh new installed system, which has the same name or ip before through ssh, logging in to the client may fail. The reason is that the new system has the different host key. In that case, find the host key and remove them, and try to connect to it again. The new updated host key will be saved into $HOME/.ssh/known_hosts
Find the Host Key as :
user@host:~$ ssh-keygen -F 0.0.0.11
# Host 0.0.0.1 found: line 25 type ECDSA
|1|fqIKruXgQiBiaC3m8BBjyMTyxjE=|tn1kZ4Xc0QFRHtP9ktfjfAfH6tU= ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyN6644sgxjr4zdHAyNTYAAABBBCnqFheVaXkvg6Zozli0WpkMRcPgOtir9X3t58loczY9//iTSWdKBEHNVKBP+DaTAII/JRs/7Id0vD8G1vGpFd8=
Remove the Host Key as :
user@host:~$ ssh-keygen -R 0.0.0.11
/home/user/.ssh/known_hosts updated.
Original contents retained as /home/user/.ssh/known_hosts.old
'Computer > linux' 카테고리의 다른 글
open X-application with su after ssh a user login. (0) 2014.09.17 emacs korean font - 이멕스 한글 폰트 (0) 2014.06.07 Setup Java 8 on host, in order to use site-wide through network file system (0) 2014.05.28