复制密钥另一台主机时,出现了错误:

Read from socket failed: Connection reset by peer.

到被登录主机的/var/log/auth.log查看日志:

Mar  7 12:51:59 slave01 sshd[2919]: error: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Mar 7 12:51:59 slave01 sshd[2919]: error: @ WARNING: UNPROTECTED PRIVATE KEY FILE! @
Mar 7 12:51:59 slave01 sshd[2919]: error: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Mar 7 12:51:59 slave01 sshd[2919]: error: Permissions 0711 for '/etc/ssh/ssh_host_rsa_key' are too open.
Mar 7 12:51:59 slave01 sshd[2919]: error: It is required that your private key files are NOT accessible by others.
Mar 7 12:51:59 slave01 sshd[2919]: error: This private key will be ignored.
Mar 7 12:51:59 slave01 sshd[2919]: error: key_load_private: bad permissions
Mar 7 12:51:59 slave01 sshd[2919]: error: Could not load host key: /etc/ssh/ssh_host_rsa_key

应该是/etc/ssh文件夹的权限问题,执行下面的操作更改权限:

# cd /etc/ssh
# chmod 0644 *
# chmod 0600 ssh_host_dsa_key ssh_host_rsa_key

再重新启动sshd服务,复制成功,并且可以ssh登录。

Read from socket failed: Connection reset by peer.的更多相关文章

  1. SSH error ( Read from socket failed: Connection reset by peer ) and it's solution

    SSH error ( Read from socket failed: Connection reset by peer ) and it's solution ssh cann't connect ...

  2. SSH 错误解决案例1:Read from socket failed: Connection reset by peer

    今天早上天天连接的开发机突然报出连接错误. 这个错误是SSH最常见错误,造成的原因也是千奇百怪(具体可goole),下面描述我的server的问题: 客户端报错 [root@server]# ssh ...

  3. ssh-copy-id to filter out any that...ERROR: Read from socket failed: Connection reset by peer

    ssh-copy-id bigboss1 /usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter ...

  4. Read from socket failed: Connection reset by peer 问题

    [FAILED] 解决方法:#chmod 600 sshd_config ssh_host_dsa_key ssh_host_key ssh_host_rsa_key#chmod 620 moduli ...

  5. ssh连接异常:read from socket failed connection reset by peer

    我出现这个问题的原因是:之前将/etc的权限设为777, 这是一个错误的操作!!然后我把权限修改过来(chmod 400 /etc) 重启服务(/bin/systemctl restart ssh.s ...

  6. 转:get value from agent failed: ZBX_TCP_READ() failed;[104] connection reset by peer

    get value from agent failed: ZBX_TCP_READ() failed;[104] connection reset by peer zabbix都搭建好了,进行一下测试 ...

  7. jmeter测试文件上传接口报错:connection reset by peer: socket write error

    最近在对文件上传接口性能测试时,设置150线程数并发时,总会出现以下错误:connection reset by peer: socket write error 在网上搜索了一下,得到的原因有这些: ...

  8. Error -27780: Connection reset by peer: socket write error

    Problem Description: Error: "-27780: read to host failed: [10054] Connection reset by peer" ...

  9. Error -27780: [GENERAL_MSG_CAT_SSL_ERROR]connect to host "124.202.213.70" failed: [10054] Connection reset by peer [MsgId: MERR-27780]

    解决方案一: 备注: 此方案如果请求响应时间太长,勾选"WinInet replay instead of Sockets(Windows only)"将会导致如下错误:

随机推荐

  1. [开源]Google code Android开源项目(一)

    [Android分享] [开源]Google code Android开源项目(一) [复制链接]     449122717 2 主题 2 好友 816 积分 No.4 中级开发者 升级  19.3 ...

  2. 用PopupWindow实现弹出菜单(弹出的菜单采用自定义布局)

         用PopupWindow实现弹出菜单是一个比较好的方式.当然我们还有一个类PopupMenu也能实现弹出菜单,但那个太过于局限了,所以不是很推荐. 这个实例的效果是这样的:点击按钮后,一个菜 ...

  3. PostgreSQL入门,PostgreSQL和mysql

    PostgreSQL被誉为“世界上功能最强大的开源数据库”,是以加州大学伯克利分校计算机系开发的POSTGRES 4.2为基础的对象关系型数据库管理系统. PostgreSQL支持大部分 SQL标准并 ...

  4. 使用Bootstrap后,关于IE与Chrome显示字体的问题

    在做日志系统时,使用了Bootstrap,然后通过浏览器查看的页面效果如下 对比可以看到,同样的字体,IE显示的圆润些,而Chrome字体则丑很多.因为Chrome默认用宋体 在http://v3.b ...

  5. 再看copy_on_write缩小临界区的例子

    本例子是模拟的读者写者问题,采用shared_ptr+写时拷贝实现,其中我觉得一个比较值得注意的地方是考虑到对象可能在临界区析构而将析构移除临界区,这对于多线程来说要多看多思. #include< ...

  6. 在ASP.NET MVC中以post方式传递数组参数的示例【转】

    最近在工作中用到了在ASP.NET MVC中以post方式传递数组参数的情况,记录下来,以供参考. 一.准备参数对象 在本例中,我会传递两个数组参数:一个字符串数组,一个自定义对象数组.这个自定义对象 ...

  7. [leetcode]Combinations @ Python

    原题地址:https://oj.leetcode.com/problems/combinations/ 题意:组合求解问题. 解题思路:这种求组合的问题,需要使用dfs来解决. 代码: class S ...

  8. Angular2 -- 生命周期钩子

    组件生命周期钩子 指令和组件的实例有一个生命周期:新建.更新和销毁. 每个接口都有唯一的一个钩子方法,它们的名字是由接口名加上 ng前缀构成的.比如,OnInit接口的钩子方法叫做ngOnInit. ...

  9. java 上传图片压缩

    public static void uploadFile(MultipartFile multfile, String filePath) throws Exception { File targe ...

  10. Direct2D教程VIII——几何(Geometry)对象的运算,本系列的终结篇

    目前博客园中成系列的Direct2D的教程有 1.万一的 Direct2D 系列,用的是Delphi 2009 2.zdd的 Direct2D 系列,用的是VS中的C++ 3.本文所在的 Direct ...