Chinaunix首页 | 论坛 | 博客
  • 博客访问: 354051
  • 博文数量: 51
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 1189
  • 用 户 组: 普通用户
  • 注册时间: 2014-02-14 15:23
文章分类
文章存档

2017年(4)

2016年(7)

2015年(9)

2014年(31)

我的朋友

分类: LINUX

2014-04-30 13:12:08

解决linux中ssh登录Warning:Permanently added (RSA) to the list of known hosts

原因:

在执行scp id_rsa.pub 这一步时,没在本机的/root/.ssh下生成known_hosts文件。

解决方案:

vi /etc/ssh/ssh_config

最后有两行是

         StrictHostKeyChecking no

         UserKnownHostsFile /dev/null

把这两行注释掉并保存文件

再次执行scp id_rsa.pub 

出现提示

The authenticity of host 'host141 (172.20.0.141)' can't be established.

RSA key fingerprint is a0:09:89:d2:3b:aa:91:60:59:7f:7f:bc:03:31:b0:09.

Are you sure you want to continue connecting (yes/no)? 

输入yes后,则可看到在/root/.ssh目录下生成了known_hosts文件:

[root@SamuluIndex .ssh]# ls

id_rsa  id_rsa.pub  known_hosts

阅读(29339) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~