gerrit 使用過程中遇到的問題

1. 在執行gerrit命令時遇到如下問題


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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
0d:81:44:63:96:d1:18:66:48:72:76:09:40:18:d9:b8.
Please contact your system administrator.
Add correct host key in /home/luanhongjun/.ssh/known_hosts to get rid of this message.
Offending RSA key in /home/luanhongjun/.ssh/known_hosts:1
  remove with: ssh-keygen -f "/home/luanhongjun/.ssh/known_hosts" -R [42.62.42.75]:29418
RSA host key for [42.62.42.75]:29418 has changed and you have requested strict checking.
Host key verification failed.


這是由於gerrit服務器上的frngerprint與本地不一致所致。這種情況一般發生於當gerrit服務器重新配置時,因爲IP地址未變,而重新配置之前服務器IP及fingerprint已經被保存與本地/.ssh/known_hosts中,因此當再次登錄服務器時,會拿本地保存的fingerprint與服務器的做比較結果發現不一致。


所以需要將known_hosts中的關於這個IP的記錄刪掉。

注意:如果將用戶目錄下的know_hosts中的記錄清掉仍然不起作用,則可能在/root/.ssh/目錄下的know_hosts也許要清空,這個問題需要看上述錯誤信息的記錄地址。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章