MAC下SSH终端报错,清除原有ssh密钥方法

来自:互联网
时间:2018-07-29
阅读:

随着Mac市场份额不断增加,相信很多新手站长已经在Mac上管理服务器了,不知道大家是否遇到过,当你的远程服务器系统重装之后,Mac终端连接ssh user@服务器IP,输入密码会报错,这个问题如何解决呢?dEB免费资源网

错误提示如下:dEB免费资源网

KENFORFORLIN:~ kenforstar$ sudo ssh root@192.168.1.203Password:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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 isea:24:31:8d:03:07:36:db:2f:74:15:5d:58:67:a3:5b.
Please contact your system administrator.
Add correct host key in /var/root/.ssh/known_hosts to get rid of this message.
Offending key in /var/root/.ssh/known_hosts:1RSA host key for 192.168.1.203 has changed and you have requested strict checking.
Host key verification failed.

解决方法:打开Mac终端,输入以下命令即可——dEB免费资源网

ssh-keygen -R IP(你远程服务器ip地址)
返回顶部
顶部