收藏文章 楼主

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

版块:linux   类型:普通   作者:小绿叶技术博客   查看:851   回复:0   获赞:0   时间:2022-01-07 11:59:56


原因:


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


 





解决方案:


vi /etc/ssh/ssh_config


最后有两行是

         StrictHostKeyChecking no

         UserKnownHostsFile /dev/null


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


systemctl restart sshd     # 重启sshd 

提供企业建站服务,免费网防系统,提交信息登录 http://yundun.ddoss.cn 邮箱: proposal@ddoss.cn 
回复列表
默认   热门   正序   倒序

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

头像

用户名:

粉丝数:

签名:

资料 关注 好友 消息