(已解決)WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!
- 分類:博文-IT資訊
- 發(fā)布于 2016年8月28日 星期日 10:45
- 作者:Super User
- 點擊數(shù):17133
一、環(huán)境
Ubuntu 14.04 + Ubuntu 16.04 + SCP
二、原因
Ubuntu 14.04重裝了ssh 服務(wù)端,在16.04上能夠ssh登錄,但不能scp,原因是16.04上的~/.ssh/known_hosts文件內(nèi)的驗證沒有更新,出現(xiàn)以下提示:
long@long:~/.ssh$ sudo scp -P 2250 ./桌面/logist.sql
該Email地址已收到反垃圾郵件插件保護。要顯示它您需要在瀏覽器中啟用JavaScript。
:/var/www
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@??? 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 ECDSA key sent by the remote host is
SHA256:Uz6iC5uYv2duVNZUiv6uGnh20MSjTIuT6zqkea/8XSE.
Please contact your system administrator.
Add correct host key in /root/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /root/.ssh/known_hosts:2
? remove with:
? ssh-keygen -f "/root/.ssh/known_hosts" -R [218.X.X.202]:2250
ECDSA host key for [218.X.X.202]:2250 has changed and you have requested strict checking.
Host key verification failed.
lost connection
三、解決辦法
更新ECDSA即可,命令如下:
long@long:~/.ssh$ sudo ssh-keygen -f "/root/.ssh/known_hosts" -R [218.X.X.202]:2250
# Host [218.X.X.202]:2250 found: line 2
/root/.ssh/known_hosts updated.
四、結(jié)果
long@long:~/.ssh$ sudo scp -P 2250 ./桌面/logist.sql 該Email地址已收到反垃圾郵件插件保護。要顯示它您需要在瀏覽器中啟用JavaScript。 :/var/www
The authenticity of host '[218.X.X.202]:2250 ([218.X.X.202]:2250)' can't be established.
ECDSA key fingerprint is SHA256:Uz6iC5uXv2duYNZUiv6uZnh20MSjTIuT6zqkea/8XSE.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '[218.X.X.202]:2250' (ECDSA) to the list of known hosts.
該Email地址已收到反垃圾郵件插件保護。要顯示它您需要在瀏覽器中啟用JavaScript。 's password:
logist.sql 100% 57MB 285.5KB/s 03:25