2016年7月26日 星期二

【Oracle ERP Note 】RSA host key has just been changed

Problem:

以 scp 將檔案 copy 至遠端時,系統抱怨 "WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! " (因系統重灌 OS,但仍沿用之前 IP)

# scp app-.tar.gz  root@10.20.1.45:/               @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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 the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
38:49:5d:16:58:36:c5:10:6c:53:36:b2:52:0e:c3:18.
Please contact your system administrator.
Add correct host key in /root/.ssh/known_hosts to get rid of this message.
Offending key in /root/.ssh/known_hosts:4
RSA host key for 10.20.1.45 has changed and you have requested strict checking.
Host key verification failed.
lost connection

Solution:

以 vi 刪除 /root/.ssh/known_hosts 的 IP 10.20.1.45 (含 key)

# scp app-.tar.gz root@10.20.1.45:/
The authenticity of host '10.20.1.45 (10.20.1.45)' can't be established.
RSA key fingerprint is 38:49:5d:16:58:36:c5:10:6c:53:36:b2:52:0e:c3:18..
Are you sure you want to continue connecting (yes/no)? yes

此時新的一筆 IP 加入 /root/.ssh/known_hosts

Reference:

1. How To Fix Offending key in ~/.ssh/known_hosts file, http://www.thegeekstuff.com/2010/04/how-to-fix-offending-key-in-sshknown_hosts-file

沒有留言:

張貼留言

prettyPrint();