码迷,mamicode.com
首页 > 其他好文 > 详细

转 解决Centos6.5中ssh登录时Warning:Permanently added (RSA) to the list of known hosts的警告

时间:2020-07-07 15:34:46      阅读:57      评论:0      收藏:0      [点我收藏+]

标签:rsa   问题   输入密码   免密码登录   不用   warning   info   通过   etc   

当主机使用ssh免密码登录时,弹出Warning:Permanently added (RSA) to the list of known hosts的警告,看着很碍眼。通过以下方法进行解决:技术图片

 

 

技术图片

 

 

 

 

 

 

1:vim  /etc/ssh/ssh_config(master和slave1都需要设置)

找到#StrictHostKeyChecking ask去掉注释,并把ask改为no即可

 

技术图片

 技术图片

 

 

一、可以把~/.ssh/known_hosts清除
二、如果还是不行
修改/etc/ssh/sshd-config文件,将其中的PermitRootLogin no修改为yes,PubkeyAuthentication yes修改为no,AuthorizedKeysFile .ssh/authorized_keys前面加上#屏蔽掉,PasswordAuthentication no修改为yes就可以了。
三、如果还是有问题,那可以用下面的方式解决:
用命令 ssh -l username hostname

1、这个是ssh安全认证是的一个RSA认证。此处必须选择yes才能连接。
第一次yes后,他会询问你是否永久把这个RSA认证加入本地,选择yes后,以后不会再出现提醒。
每次登陆只需要输入密码即可。

2、也可以不用输入1中的yes,但是需要修改本机配置。

/etc/ssh/ssh_config 中的#  StrictHostKeyChecking ask 改成  StrictHostKeyChecking no

转 解决Centos6.5中ssh登录时Warning:Permanently added (RSA) to the list of known hosts的警告

标签:rsa   问题   输入密码   免密码登录   不用   warning   info   通过   etc   

原文地址:https://www.cnblogs.com/python-xiakaibi/p/13260601.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!