2018-03-10ssh连接Linux服务器提示The authenticity of host 'xxx' can't be established.

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

2018-03-10ssh连接Linux服务器提示The authenticity of host 'xxx' can't be established._第1张图片
image.png

【解决方法】

1.使用ssh连接远程主机时加上“-o StrictHostKeyChecking=no”的选项,如下:

ssh -o StrictHostKeyChecking=no [email protected]

2.去配置文件彻底去掉这个提示,修改/etc/ssh/ssh_config文件中的配置,添加如下两行配置:

StrictHostKeyChecking no
UserKnownHostsFile /dev/null

修改好配置后,重新启动sshd服务即可,命令为:

/etc/init.d/sshd restart (或 service sshd restart )

参考文献

你可能感兴趣的:(2018-03-10ssh连接Linux服务器提示The authenticity of host 'xxx' can't be established.)