如何解决“Offending key in ~/.ssh/known_hosts” file
来源:互联网 发布:linux 关闭swap 编辑:程序博客网 时间:2024/04/30 11:42
Remove the offending ssh key
Following error will be displayed when the remote host key changes (after you’ve connected earlier with a valid remote host key).
[javascript] view plain copy
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
a7:a8:f2:97:94:33:58:b7:9d:bc:e0:a6:6b:f7:0a:29.
Please contact your system administrator.
Add correct host key in /home/ramesh/.ssh/known_hosts to get rid of this message.
Offending key in /home/ramesh/.ssh/known_hosts: 6
Permission denied (publickey,password).
You have to remove the key to proceed further. Use the following command to remove the offending key.
[javascript] view plain copy
sed -i ‘6d’ ~/.ssh/known_hosts
Note: Change the 6d according to the line number shown.
If your sed does not have -i option, use perl or use some editor to remove the offending key.
Perl solution:
[javascript] view plain copy
perl -pi -e ‘s/\Q//if( . == 6);’ ~/.ssh/known_hosts
Note: Change the line number from 6 to appropriate line number.
转载自:
http://blog.csdn.net/fisher_jiang/article/details/7351343
- 如何解决“Offending key in ~/.ssh/known_hosts” file
- 如何解决“Offending key in ~/.ssh/known_hosts” file
- 如何解决“Offending key in ~/.ssh/known_hosts” file
- 如何解决“Offending key in ~/.ssh/known_hosts” file
- Offending RSA key in /Users/liuhang/.ssh/known_hosts:7
- Please contact your system administrator. Add correct host key in /Users/*********/.ssh/known_hosts
- linux内网SSH,SCP登录其他服务器Add correct host key in /root/.ssh/known_hosts to get rid of this message
- ssh登陆忽略known_hosts文件(ssh 登陆提示Host key verification failed.)
- 使用paramiko中 not found in known_hosts的错误解决
- 删除ssh默认known_hosts
- /home/User/.ssh/known_hosts
- github生成多个ssh key,如何解决
- 如何生成SSH key
- 如何生成SSH key
- 如何生成SSH key
- 如何生成ssh key
- 如何生成SSH key
- 如何生成SSH key
- nyoj 891 找点
- PAT 1002. 写出这个数 (20)
- NSString与NSDate互相转换
- c++实验4作业
- 漫步云中网络,第 2 部分
- 如何解决“Offending key in ~/.ssh/known_hosts” file
- POJ 1741Tree 树分治 dp
- 压缩感知和稀疏信号处理课程笔记(陆吾生)
- 11536 Smallest Sub-Array(入门级TwoPoint)
- Android基础:Camera
- phpexcle在thinkphp3.2.3下的导入导出数据
- Linux | 代码统计工具SLOCCount
- The content of element type "session-factory" must match "(property*,mapping*,(class-cache|collectio
- 如何去除JQuery Mobile中的默认input样式(转)