由於 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]