iT邦幫忙

0

有關LINUX RSA的問題

最近公司有一台伺服器重灌系統後
但是我要用另一下台電腦(OS也是LINUX)用SFTP過去做遠端連線的時候
就會出現下列訊息:
"WARNING : REMOTE HOST IDENTIFICATION HAS CHANGED!"
It is possible that someone is doing something nasty.
someone could be eavesdroopping on you right now(man-in-the-middle attack)!
It is also possible that the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
36:78::08:9c:23:c3:a2:f0:a8:4c:D4:c2:78:7c
Please contact your system admin to add correct host key in /.ssh/known_hosts to get rid of this message.
offending key in /.ssh/known_hosts:1
RSA host key for 10.200.254.130 has changed and you have requested strict checking.
Connection closed.
請問是怎回事呢??
印象中LINUX不是公鑰會自動產生嗎?為何還要我自己建立呢?要怎樣建立呢?

雷夢卡爾 iT邦研究生 5 級 ‧ 2012-01-30 08:27:46 檢舉
可以在 另一台 linux 電腦上執行 "ssh-keygen -R 10.200.254.130" ,這樣會在 ~/.ssh/known_hosts 的檔案中將 SFTP 的 RSA 清除。之後在重新連線就可以連線了。
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

1 個回答

14
wiseguy
iT邦超人 1 級 ‧ 2012-01-25 10:25:16
最佳解答

它是說,你曾經用這台 A 電腦連過去 B 電腦,當時已經把 B 電腦的公鑰指紋記起來。B 電腦重灌後,重新產生 RSA 公私鑰,所以當你又連過去時,它發現 B 電腦的公鑰指紋已經改變,所以警告你,你連的不是當初連的那一台。

你只要把 A 電腦連過去 B 所使用的帳號,目錄中的 ~/.ssh/known_hosts 刪掉,再重連就好了。

謝謝已經解決嚕...我是在鳥哥的書上找到答案嚕...但還是很感謝您的解答喔

我要發表回答

立即登入回答