sshd 服务启动失败:ssh.service 失败,因为控制进程退出并显示错误代码

sshd 服务启动失败:ssh.service 失败,因为控制进程退出并显示错误代码

我不确定为什么它没有启动或者为什么阻止我连接,我收到此错误:

root@vmi: "# sudo service ssh status
ssh.service OpenBSD Secure Shell server
Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sun 2022-11-27 09:47:47 CST; 4min 58s ago
Docs: man: sshd (8) man: sshd_config(5)
Process: 446 ExecStartPre=/usr/sbin/sshd -t (code=exited, status=255/EXCEPTION)

Nov 27 09:47:47 vmi.contaboserver.net systemd[1]: ssh.service: Scheduled restart job, restart>
Nov 27 09:47:47 vmi.contaboserver.net systemd[1]: Stopped OpenBSD Secure Shell server.
Nov 27 09:47:47 vmi.contaboserver.net systemd[1]: ssh.service: Start request repeated too qui>
Nov 27 09:47:47 vmi.contaboserver.net systemd[1]: ssh.service: Failed with result 'exit-code'.
Nov 27 09:47:47 vmi.contaboserver.net systemd[1]: Failed to start OpenBSD Secure Shell server. lines 1-12/12 (END)

答案1

运行journalctl -xe并将输出粘贴到这里。应该还有更多信息,很可能是您的端口已被某些东西使用,而 sshd 无法绑定到它。

相关内容