如何解决“Offending key in ~/.ssh/known_hosts” file
来源:互联网 发布:军服 书 知乎 编辑:程序博客网 时间:2024/04/30 15:56
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).
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 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 isa7: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: 6Permission denied (publickey,password).
You have to remove the key to proceed further. Use the following command to remove the offending key.
# 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:
# perl -pi -e 's/\Q$_// if ($. == 6);' ~/.ssh/known_hosts
Note: Change the line number from 6 to appropriate line number.
- 如何解决“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
- hdu 1082 Matrix Chain Multiplication
- 【转】C语言中换行符与回车符的区别
- 学计算机的都是一群疯子!!!!
- 写给想当程序员的朋友
- JQuery id不能为特殊字符解决方案
- 如何解决“Offending key in ~/.ssh/known_hosts” file
- 还是夜晚做事情效率高啊
- 从今天开始面朝大海,春暖花开
- ubuntu 11.10 修改grub引导的背景图片和字体大小
- 2012年的计划
- 一个程序员的十年总结
- mac word 插入图片不完全显示
- java的访问权限控制--疑问
- Java中的线程池