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

报错:Read from socket failed: Connection reset by peer

查看报错机器的 /etc/ssh/文件的的权限

ll

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

查看正常机器的/etc/ssh/文件

ll

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

对面发现三个文件的权限不一样

解决方法:

将报错的机器赋予正确的用户权限

chown -R root:ssh_keys ssh_host_ecdsa_key
chown -R root:ssh_keys ssh_host_ed25519_key
chown -R root:ssh_keys ssh_host_rsa_key

然后问题解决

上一篇:linux常用命令~文件权限操作


下一篇:linux中chmod、chgrp、chown详解