使用ssh连接连接Linux服务器时,报以下错误:

【解决方法】
1.使用ssh连接远程主机时加上“-o StrictHostKeyChecking=no”的选项,如下:
ssh -o StrictHostKeyChecking=no root@47.104.xxx.xx
2.去配置文件彻底去掉这个提示,修改/etc/ssh/ssh_config文件中的配置,添加如下两行配置:
StrictHostKeyChecking no
UserKnownHostsFile /dev/null
修改好配置后,重新启动sshd服务即可,命令为:
/etc/init.d/sshd restart (或 service sshd restart )
网友评论