如何在 OpenSSH 8.8 的 sshd 中启用 ssh-rsa?

如何在 OpenSSH 8.8 的 sshd 中启用 ssh-rsa?

由于 OpenSSH 版本 8.8 ssh-rsa 在 OpenSSH sshd 中被禁用:

$ ssh-audit 1.2.3.4
# algorithm recommendations (for OpenSSH 8.8)
...
(rec) +ssh-rsa                              -- key algorithm to append
...

Archlinux 论坛主题“最新的 sshd 不接受关键算法”建议:

$ grep PubkeyA /etc/ssh/sshd_config
#PubkeyAuthentication yes
PubkeyAcceptedKeyTypes=+ssh-rsa

尽管该配置片段不会在 5.10.74-1-raspberrypi4-ARCH 上的 openssh-8.8p1-1 中启用 ssh-rsa,即使在重新启动sshd.

如何强制 OpenSSH sshd 版本 8.8 启用 ssh-rsa?

答案1

要允许对 OpenSSH 8.8+ 使用旧的 RSA 密钥,请将以下行添加到您的sshd_config

HostKeyAlgorithms=ssh-rsa,[email protected]

PubkeyAcceptedAlgorithms=+ssh-rsa,[email protected]

其他发行版(然后是 RPi 上的 Arch)可能支持更安全的西姆斯键,它们是最新 NIST 论文推荐使用

HostKeyAlgorithms=ssh-rsa,[email protected],[email protected],[email protected]

[email protected]

PubkeyAcceptedAlgorithms=+ssh-rsa,[email protected],[email protected],[email protected]

相关内容