Read from socket failed: Connection reset by peer.
2017-03-07 13:14
162 查看
复制密钥另一台主机时,出现了错误:
到被登录主机的/var/log/auth.log查看日志:
应该是/etc/ssh文件夹的权限问题,执行下面的操作更改权限:
再重新启动sshd服务,复制成功,并且可以ssh登录。
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登录。
相关文章推荐
- SSH 错误解决案例1:Read from socket failed: Connection reset by peer
- SSH error ( Read from socket failed: Connection reset by peer ) and it's solution
- Ubuntu上的Read from socket failed: Connection reset by peer
- CentOS7使用ssh不能登录,报错:Read from socket failed: Connection reset by peer
- Read from socket failed: Connection reset by peer
- Read from socket failed: Connection reset by peer
- SSH error ( Read from socket failed: Connection reset by peer ) and it's solution
- Read from socket failed: Connection reset by peer 问题
- 【OpenStack】SSH登录虚拟机出现"Read from socket failed: Connection reset by peer"问题的解决办法
- ssh Read from socket failed: Connection reset by peer
- 【OpenStack】SSH登录虚拟机出现"Read from socket failed: Connection reset by peer"问题的解决办法
- Read from socket failed: Connection reset by peer
- Read from socket failed: Connection reset by peer 问题
- Read from socket failed: Connection reset by peer 问题
- 使用Mob短信验证出现 java.net.SocketException: recvfrom failed: ECONNRESET (Connection reset by peer)异常
- get value from agent failed: ZBX_TCP_READ() failed;[104] connection reset by peer
- java.net.SocketException: recvfrom failed: ECONNRESET (Connection reset by peer)
- java.net.SocketException: recvfrom failed: ECONNRESET (Connection reset by peer)我的解决办法
- *SocketException: recvfrom failed: ECONNRESET (Connection reset by peer)
- Android网络请求报错:java.net.SocketException: recvfrom failed: ECONNRESET (Connection reset by peer)