最近公司有一台伺服器重灌系統後
但是我要用另一下台電腦(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不是公鑰會自動產生嗎?為何還要我自己建立呢?要怎樣建立呢?
它是說,你曾經用這台 A 電腦連過去 B 電腦,當時已經把 B 電腦的公鑰指紋記起來。B 電腦重灌後,重新產生 RSA 公私鑰,所以當你又連過去時,它發現 B 電腦的公鑰指紋已經改變,所以警告你,你連的不是當初連的那一台。
你只要把 A 電腦連過去 B 所使用的帳號,目錄中的 ~/.ssh/known_hosts 刪掉,再重連就好了。