终端输入:ssh root@服务器地址服务器
错误提示:ssh
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@this
WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! spa
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@rem
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!Someone could be eavesdropping on you right get
now (man-in-the-middle attack)!It is also possible that a host key has just been changed.The fingerprint for the io
RSA key sent by the remote host isSHA256:这里每一个人都不一样Please contact your system administrator.Add correct 服务器端
host key in /Users/Anan/.ssh/known_hosts to get rid of this message.Offending RSA key in /Users/Anan/.ssh/known终端
_hosts:1RSA host key for 这里是服务器的IP has changed and you have requested strict checking.Host key verification failed.request
解决方法:
终端输入:
ssh-keygen -R 输入服务器的IP
ssh root@服务器地址
出现:Are you sure you want to continue connecting (yes/no)?
输入yes,
就完成链接啦!同时,新的认证也生成了
在mac下使用终端链接服务器方式
缘由:
第一次SSH链接时,会生成一个认证,储存在客户端(也就是用SSH连线其余电脑的那个,本身操做的那个)中的known_hosts,
可是若是服务器验证过了,认证资讯固然也会更改,服务器端与客户端不一样时,就会跳出错误啦~所以,只要把电脑中的认证资
讯删除,连线时从新生成(删除指令:ssh-keygen -R 输入服务器的IP)