1.问题说明
Linux远程服务器突然无法SSH登录了,
登陆报错:ssh_exchange_identification: read: Connection reset by peer
2.问题原因
最近安装MySQL数据库,
安装过程中修改了var目录的权限,
偷懒直接chmod -R 777 /var。
3.解决办法
将SSH相关文件的权限改回来,
确保权限为755,属主为root:root。
3.1.查看sshd状态
service sshd status
Redirecting to /bin/systemctl status sshd.service
● sshd.service - OpenSSH server daemon
Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled; vendor preset: enabled)
Active: active (running) since 二 2019-04-09 23:36:09 CST; 18h ago
Docs: man:sshd(8)
man:sshd_config(5)
Process: 1357 ExecStart=/usr/sbin/sshd $OPTIONS (code=exited, status=0/SUCCESS)
Main PID: 1358 (sshd)
CGroup: /system.slice/sshd.service
├─ 1358 /usr/sbin/sshd
├─20443 sshd: root@pts/1
├─20445 sshd: root@notty
├─20447 /usr/libexec/openssh/sftp-server
├─20594 -bash
├─23794 sshd: mysql [priv]
├─23796 sshd: mysql@pts/0
├─23797 sshd: mysql [p

最低0.47元/天 解锁文章
2797

被折叠的 条评论
为什么被折叠?



