centos7 SSH启动失败 报错 job for sshd.service failed because the control
    文章作者:恒爱网络 阅读次数:1350 发布时间:2023-11-10

    某用户的centos7系统突然22端口无法远程了。求助我司给与协助。于是登录到本地给予检查,发现SShd 服务未运行, 执行systemctl sshd start  启动命令报错 SSH启动失败 报错job for sshd.service failed because the control process exited with error code. See systemctl status sshd.service and “journalctl -xe” for details

    因此根据提示查看报错日志,执行 systemctl status sshd.service

    注意看关键报错日志:Permissions 0715 for  /etc/ssh/ssh_host_ed25519_key   其中 Permissions 意味着权限不够。

    因此给出错的文件加权限:chmod 600 /etc/ssh/ssh_host_ed25519_key

    最后 启动SSHd服务 :systemctl sshd start

    终于搞定!