OpenSSH的known_hosts引发的问题
来源:互联网 发布:唐青枫官方捏脸数据 编辑:程序博客网 时间:2024/06/07 01:12
Ubuntu 15.4
http://blog.csdn.net/u013686019/article/details/54574119
在使用OpenSSH的时候,如果没有特别指定目录,known_hosts文件存在于:
~/.ssh/
目录下。known_hosts记录了本机访问过的计算机的pubic key。
这两天从服务器同步Android源码,执行repo sync后总是卡在连接服务器的位置:
Get ssh://git@www.xxxxxx.com.cn/gerrit/android/platform/manifestWarning: the ECDSA host key for 'www.xxxxxx.com.cn' differs from the key for the IP address '192.168.1.9'Offending key for IP in /home/gerrit/.ssh/known_hosts:1Matching host key in /home/gerrit/.ssh/known_hosts:3Are you sure you want to continue connecting (yes/no)? yesWarning: the ECDSA host key for 'www.xxxxxx.com.cn' differs from the key for the IP address '192.168.1.9'Offending key for IP in /home/gerrit/.ssh/known_hosts:1Matching host key in /home/gerrit/.ssh/known_hosts:3Are you sure you want to continue connecting (yes/no)? yes
怎么办呢?那就调试找原因。在一台没有访问过Android源码服务器的机器上执行同步,完全没问题;看到上述终端输出提到known_hosts文件,就查找了下该文件的相关信息。接着就是测试,为方便故,直接把~/.ssh/known_hosts文件删除了,这是终端输出如下:
Get ssh://git@www.xxxxxx.com.cn/gerrit/android/platform/manifestThe authenticity of host 'www.xxxxxx.com.cn (192.168.1.9)' can't be established.ECDSA key fingerprint is 4e:a5:bc:9c:92:94:29:e4:4a:12:94:fe:54:b2:4e:b0.Are you sure you want to continue connecting (yes/no)? The authenticity of host 'www.xxxxxx.com.cn (192.168.1.9)' can't be established.ECDSA key fingerprint is 4e:a5:bc:9c:92:94:29:e4:4a:12:94:fe:54:b2:4e:b0.Are you sure you want to continue connecting (yes/no)? yesWarning: Permanently added 'www.xxxxxx.com.cn,192.168.1.9' (ECDSA) to the list of known hosts.
看内容这是要重新生成~/.ssh/known_hosts。
终止操作,重新repo init/repo sync,就再没有任何问题了!
0 0
- OpenSSH的known_hosts引发的问题
- ssh “id_rsa 、id_rsa.pub、known_hosts”替换中出现的问题
- 关于Linux上的known_hosts
- OpenSSH升级到7.0+遇到的问题
- SAPOsCol引发的问题
- 学历引发的问题
- 并发引发的问题
- #define 引发的问题
- 更新引发的问题
- 计时器引发的问题
- fork引发的问题
- const_cast 引发的问题
- AsyncTask引发的问题
- background引发的问题
- AsyncTask引发的问题
- AsyncTask引发的问题
- AsyncTask引发的问题
- textarea引发的问题
- jQuery学习笔记(六) jQuery UI自动补齐,折叠菜单,Tab标签页和日期拾取器
- Dubbo
- iOS Provisioning Profile(Certificate)与Code Signing详解
- jquery ajax return值不能取得的解决方案
- eclipse查看端口被占用情况
- OpenSSH的known_hosts引发的问题
- Spring Boot——开发新一代Spring Java应用
- Java线程:新特征-有返回值的线程
- faster rcnn windows 下c++版本(二)
- win7移动硬盘没有盘符
- golang url parameters中包含array
- springmvc拦截器
- 微信小程序精品组件:chartjs:饼图,折线图,bar,point-styles
- [数学]线性方程组的解、SVD