sshd 在重启后崩溃

sshd 在重启后崩溃

这是与崩溃相关的系统日志 -

Apr 17 12:34:14 hn0-hdi-us sshd[1437]: /etc/ssh/sshd_config: line 20: Bad configuration option: KexDHMin
Apr 17 12:34:14 hn0-hdi-us sshd[1437]: /etc/ssh/sshd_config: terminating, 1 bad configuration options

Apr 17 12:34:14 hn0-hdi-us systemd[1]: ssh.service: Main process exited, code=exited, status=255/n/a
Apr 17 12:34:14 hn0-hdi-us systemd[1]: Failed to start OpenBSD Secure Shell server.
Apr 17 12:34:14 hn0-hdi-us systemd[1]: ssh.service: Unit entered failed state.
Apr 17 12:34:14 hn0-hdi-us systemd[1]: ssh.service: Failed with result 'exit-code'.

有人熟悉这个吗?“错误的配置选项:KexDHMin”

编辑:sshd_config 文件当前第 20 行 -

ServerKeyBits 1024

**当问题出现时,这可能不是 sshd_config 文件的第 20 行。

答案1

这不是崩溃。只是由于错误的配置选项而无法启动:

Apr 17 12:34:14 hn0-hdi-us sshd[1437]: /etc/ssh/sshd_config: line 20: Bad configuration option: KexDHMin

该选项ServerKeyBits在当前的 OpenSSH 中也已弃用。我认为 Ubuntu 默认不提供此选项,因此只需将其删除即可。它没有任何用处(除非您出于某种原因使用 SSH-1 协议,但在这种情况下您已经完蛋了)。

相关内容