线上centos服务器事故,ssh登录不上

由于我偷懒直接更改/var文件夹权限为777,导致ssh登录不上服务器。出现报错

ssh_exchange_identification: read: Connection reset by peer。

解决方式是:

3.2.修复文件权限

  chmod 755 /var/empty/sshd
  如果属主不对,还需要修改属主:
  chown root:root /var/empty/sshd

3.3.重启sshd服务

  service sshd restart

解决方案是参考:

  https://blog.csdn.net/bugzeroman/article/details/89223610

原文地址:https://www.cnblogs.com/www-caiyin-com/p/13186034.html