原因:

在执行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@SamuluIndex .ssh]# ls

id_rsa  id_rsa.pub  known_hosts

解决linux中ssh登录Warning:Permanently added (RSA) to the list of known hosts的更多相关文章

  1. Warning: Permanently added '...' (RSA) to the list of known hosts --Windows下git bash 警告处理

    原链接地址 StackOverflow 处理方法: 创建文件~/.ssh/config, 此处对应windows当前用户目录下的.ssh文件夹 增加如下语句 UserKnownHostsFile ~/ ...

  2. linux中ssh登录Permanently added (RSA) to the list of known hosts问题解决

    文章出自http://www.2cto.com/os/201307/227199.html linux中ssh登录Permanently added (RSA) to the list of know ...

  3. 解决Linux下ssh登录后出现 报错 Write failed: Broken pipe 的方法

    解决也很简单,在执行 ssh 命令的时候,多加一个参数即可,如下: ssh -p 2200 -o ServerAliveInterval=60 root@8.8.8.8 #服务器 8.8.8.8 的远 ...

  4. Ubuntu 16.04 LTS上git提交出现警告Warning: Permanently added 'github.com,52.74.223.119' (RSA) to the list of known hosts. 的解决方法

    问题: Ubuntu 16.04 LTS执行 git pull时总会出现以下警告: Warning: Permanently added 'github.com,52.74.223.119' (RSA ...

  5. 解决Warning: Permanently added ' 192.168.1.230'(RSA) to the list of known hosts.

    前提 当我在刚安装的Red Hat Linux5.x系统中进行ssh 192.168.1.230 远程时,出现以下错误: Warning: Permanently added ' 192.168.1. ...

  6. Linux服务器---ssh登录

    Ssh登录     Ssh是建立在应用层和传输层的安全协议,专门为远程登录回话和其他网络服务提供安全性.利用ssh可以有效的防止远程管理中的信息泄露问题,同时ssh传输的数据是经过压缩的,可以加快传输 ...

  7. Linux中SSH服务基于key认证实践

    众所周知ssh是目前较可靠,专为远程登录会话和其他网络服务提供安全性的协议,它默认工作在tcp的22号端口,具体实现的软件有:openssh(centos默认安装的),dropbear.ssh协议目前 ...

  8. (转)详解Linux中SSH远程访问控制

    详解Linux中SSH远程访问控制 原文:http://blog.51cto.com/dengqi/1260038 SSH:是一种安全通道协议,主要用来实现字符界面的远程登录,远程复制等功能(使用TC ...

  9. ubuntu使用git的时:Warning: Permanently added the RSA host key for IP address '13.250.177.223' to the list of known hosts.

    1:问题现象: hlp@hlp:~/code/github_code/catch_imooc1$ git push origin master Warning: Permanently added t ...

随机推荐

  1. [UE4]继承标准控件

    可以继承自标准控件的自定义控件中把常用的方法封装,比如设置字体大小: 调用自定义控件的自定义函数 还可以继续创建子蓝图控件

  2. 获取器操作都是针对数据而不是数据集的,要通过append()方法添加数据表不存在的字段

    获取器操作都是针对数据而不是数据集的,要通过append()方法添加数据表不存在的字段 public function getMembership(){ //加入会员s_id = 1 $busines ...

  3. Find the peace with yourself

    The purpose of being mature is to find the real calm and peace with yourself. Or you can say the tur ...

  4. Delphi如何找到出错行的行数!!

    Delphi之通过崩溃地址找出源代码的出错行 一 什么是MAP文件 什么是 MAP 文件?简单地讲, MAP 文件是程序的全局符号.源文件和代码行号信息的唯一的文本表示方法,它可以在任何地方.任何时候 ...

  5. WebUploader 手机端上传图片(转)

    https://blog.csdn.net/loserorleader/article/details/50395040

  6. Select模式和超时

    fd_set rset; FD_ZERO(&rset); int nready; int maxfd; int fd_stdin = fileno(stdin); if(fd_stdin &g ...

  7. mysql下有符号数和无符号数的相关问题

    最近自己的程序在调用mysql的存储过程传参给smallint类型变量的时候,总是出现out of range value的错误,刚开始用C数值转换方式的二进制位转换思路来思考时,总是觉得没什么问题, ...

  8. http协议中的一些小常识

    http协议这部分的知识很重要,在面试的时候也会经常问起来. 先来看一看什么是http协议:超文本传输协议(HTTP,HyperText Transfer Protocol)是互联网上应用最为广泛的一 ...

  9. solr 请求参数过长报错,Solr配置maxBooleanClauses属性不生效原因分析

    博客分类:   上次已经写过一篇关于solr中,查询条件过多的异常的文章,这次在总结扩展一下: 有时候我们的查询条件会非常多,由于solr的booleanquery默认设置的条件数为1024,所以超过 ...

  10. IE兼容性问题的总结

    一.IE6/IE7对display:inline-block的支持欠缺 1.表现描述 这个应该算是很经典的ie兼容性问题了,inline-block作用就是将块级元素以行的等式显示.在主流浏览器中水平 ...