某用戶的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
終于搞定!