威斯尼斯人官网Read from socket failed: Connection reset by peer.,failedpeer

Read from socket failed: Connection reset by peer.,failedpeer

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

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登录。

from socket failed: Connection reset by
peer.,failedpeer 复制密钥另一台主机时,出现了错误: Read from socket
failed: Connection reset by peer. 到被登录主…

发表评论

电子邮件地址不会被公开。 必填项已用*标注