我是靠谱客的博主 风中芝麻,最近开发中收集的这篇文章主要介绍解决linux中ssh登录Warning:Permanently added (RSA) to the list of known hosts,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

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

解决方案:
vi /etc/ssh/ssh_config
最后有两行是
         StrictHostKeyChecking no 
         UserKnownHostsFile /dev/null
把这两行注释掉并保存文件
再次执行scp id_rsa.pub root@host141:/root/.ssh
出现提示
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@host100 .ssh]# ls
id_rsa  id_rsa.pub  known_hosts

最后

以上就是风中芝麻为你收集整理的解决linux中ssh登录Warning:Permanently added (RSA) to the list of known hosts的全部内容,希望文章能够帮你解决解决linux中ssh登录Warning:Permanently added (RSA) to the list of known hosts所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(68)

评论列表共有 0 条评论

立即
投稿
返回
顶部