SSH连接时提示“THE AUTHENTICITY OF HOST XX CAN’T BE ESTABLISHED”
2017-02-24 18:29
645 查看
最近在学习hadoop时,想要搭建一个集群环境,需要使用ssh方式登录,但是当我执行ssh-keygen命令生成公钥私钥各项工作做完之后。通过 ssh远程登录的方式来完成ssh中的验证,竟然会提示:The authenticity of host *** can’t be established ,需要输出一个“yes”的交互。
于是网上搜了一下教程,通过下面的方式最终解决问题,要下班了,直接拷贝了这位大哥的博客内容,写的不好请见谅!
1. 使用ssh连接远程主机时加上“-o StrictHostKeyChecking=no”的选项,如下:
2. 一个彻底去掉这个提示的方法是,修改/etc/ssh/ssh_config文件(或$HOME/.ssh/config)中的配置,添加如下两行配置:
修改好配置后,重新启动sshd服务即可,命令为:/etc/init.d/sshd restart (或 service sshd restart )
当然,这是内网中非常信任的服务器之间的ssh连接,所以不考虑安全问题,就直接去掉了主机密钥(host key)的检查。
ssh中遇到的“Host key verification failed.”问题,也是和“StrictHostKeyChecking”配置有关,很久前就总结过了,见:
ssh中“Host
key verification failed.”的解决方案
另外,不需要用户名和密码,而是使用ssh key验证实现Linux系统间的ssh免登陆,可以参考我曾经的博文:
ssh配置及实现ssh免登陆Linux
于是网上搜了一下教程,通过下面的方式最终解决问题,要下班了,直接拷贝了这位大哥的博客内容,写的不好请见谅!
1. 使用ssh连接远程主机时加上“-o StrictHostKeyChecking=no”的选项,如下:
1 | ssh -o StrictHostKeyChecking=no 192.168.xxx.xxx |
1 2 | StrictHostKeyChecking no UserKnownHostsFile /dev/null |
当然,这是内网中非常信任的服务器之间的ssh连接,所以不考虑安全问题,就直接去掉了主机密钥(host key)的检查。
ssh中遇到的“Host key verification failed.”问题,也是和“StrictHostKeyChecking”配置有关,很久前就总结过了,见:
ssh中“Host
key verification failed.”的解决方案
另外,不需要用户名和密码,而是使用ssh key验证实现Linux系统间的ssh免登陆,可以参考我曾经的博文:
ssh配置及实现ssh免登陆Linux
相关文章推荐
- ssh连接时提示THE AUTHENTICITY OF HOST XX CAN’T BE ESTABLISHED
- SSH连接时提示“THE AUTHENTICITY OF HOST XX CAN’T BE ESTABLISHED
- ssh连接The authenticity of host can't be established
- ssh连接时提示“The authenticity of host xx can’t be established”
- SSH的 The authenticity of host xxx.xxx.xxx.xxx can't be established. 问题
- 好记心不如烂笔头,ssh登录 The authenticity of host 192.168.0.xxx can't be established. 的问题
- ssh登录 The authenticity of host 192.168.0.xxx can't be established.
- 好记心不如烂笔头,ssh登录 The authenticity of host 192.168.0.xxx can't be established. 的问题
- ssh连接时提示“The authenticity of host xx can’t be ...
- ssh连接时去掉“The authenticity of host xx can’t be established”解决方法
- Git学习——使用push命令,出现The authenticity of host 'github.com (xx.xx.xx.xx)' can't be established.警告
- ssh登录 The authenticity of host 192.168.0.xxx can't be established. 的问题
- git提交到远程库时提示the authenticity of host can't be established
- ssh The authenticity of host '172.18.19.XXX (172.18.19.XXX)' can't be established.
- Git clone或push时会报错 The authenticity of host '192.168.XX.XX ' can't be established.已解决
- ssh登录The authenticity of host x.x.x.x can't be established.的问题
- The authenticity of host 'www.101du.net (60.210.17.34)' can't be established. RSA key fingerprint is xxxx. Are you sure you want
- ssh登录 The authenticity of host 192.168.0.xxx can't be established. 的问题
- The authenticity of host '0.0.0.0 (0.0.0.0)' can't be established.
- 好记心不如烂笔头,ssh登录 The authenticity of host 192.168.0.xxx can't be established. 的问题