今天早上天天连接的开发机突然报出连接错误。

这个错误是SSH最常见错误,造成的原因也是千奇百怪(具体可goole),下面描述我的server的问题:

客户端报错

[root@server]# ssh 192.168.1.22
Read from socket failed: Connection reset by peer

换个机器连接也不行,尝试重启server端的sshd,thanks god, 报错了

[root@GMTDev ssh]# service sshd restart
Stopping sshd: [ OK ]
Starting sshd: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0755 for '/etc/ssh/ssh_host_rsa_key' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
bad permissions: ignore key: /etc/ssh/ssh_host_rsa_key
Could not load host key: /etc/ssh/ssh_host_rsa_key
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0755 for '/etc/ssh/ssh_host_dsa_key' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
bad permissions: ignore key: /etc/ssh/ssh_host_dsa_key
Could not load host key: /etc/ssh/ssh_host_dsa_key
[ OK ]

先解决这个错误吧

chmod 600 /etc/ssh/*key*

service sshd restart

按理说,只有我自己用这个机器,不知道为什么权限莫名报错。

SSH 错误解决案例1: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. Read from socket failed: Connection reset by peer.

    复制密钥另一台主机时,出现了错误: Read from socket failed: Connection reset by peer. 到被登录主机的/var/log/auth.log查看日志: M ...

  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. ssh连接异常:read from socket failed connection reset by peer

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

  5. 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 ...

  6. 重新分析connection reset by peer, socket write error错误原因

    上次写<connection reset by peer, socket write error问题排查>已经过去大半年,当时把问题"敷衍"过去了. 但是此后每隔一段时 ...

  7. 【SSH错误】ssh_exchange_identification: read: Connection reset by peer

    进行远程登录时,ssh root@xxxxxxxxx出现如下错误 ssh_exchange_identification: read: Connection reset by peer 解决方案:登录 ...

  8. Loadrunner回放https脚本时出现错误Error -27780 Connection reset by peer解决办法

    录制好的https协议的web脚本,在脚本回放时会出现Error -27780: [GENERAL_MSG_CAT_SSL_ERROR]connect to host "......&quo ...

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

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

随机推荐

  1. eclipse断点调试时不能进入断点调试

    页面JavaScript代码有错误!!!F12调试.

  2. 《JavaScript模式》精要

    P25. 如何避免eval()定义全局变量? 如: var jsstring = "var un = 1;"; eval(jsstring); console.log(typeof ...

  3. import详解

    试想一下 在工作中今年在一个项目中可能会导入某一个目录下的模块文件,那这个时候怎么样才能让Python解释器能够找到该模块进行调用呢? - 将这个模块拷贝一份到当前使用目录下. 这种方式让模块太冗余 ...

  4. 一段js代码的分析

    function foo(a){ console.log(a+b); b=a+2; console.log(a+b); } foo(2); foo(3); var b=3; foo(4); 结果是: ...

  5. MATLAB多项式及多项式拟合

    多项式均表示为数组形式,数组元素为多项式降幂系数 1.      polyval函数 求多项式在某一点或某几个点的值. p = [1,1,1];%x^2+x+1 x = [-1,0,1];y = po ...

  6. Laravel项目使用腾讯云对象存储上传图片(cos-php-sdk-v5版本)

    为了加快网站访问速度.降低网站负载,现在越来越多的网站选择把图片等静态文件放在云上,这里介绍一下腾讯云对象存储在Laravel项目中的使用 1.申请腾讯云对象存储.创建Bucket.获取APPID等参 ...

  7. php split 和 explode 的区别

    php split 和 explode 的区别 split (PHP   3,   PHP   4   ) split   --   用正则表达式将字符串分割到数组中 说明 array   split ...

  8. Visual Studio Code更改语言

    参数地址:Visual Studio Code 设置Display Language介绍 在Visual Studio Code中使用快捷键Ctrl + Shift + P可以打开命令行 在local ...

  9. [BZOJ 3152] 组合子逻辑

    Link: BZOJ 3152 传送门 Solution: 喜闻乐见,gyz出的语文题,题意要看半小时 题意:使用最少的括号将序列分割,对于每个括号中的序列,设最左边的数为$num$,序列中元素个数为 ...

  10. Codeforces 914 C Travelling Salesman and Special Numbers

    Discription The Travelling Salesman spends a lot of time travelling so he tends to get bored. To pas ...