OpenSSH 8.8 の sshd で ssh-rsa を有効にする方法は?

OpenSSH 8.8 の sshd で ssh-rsa を有効にする方法は?

OpenSSH リリース 8.8 以降、OpenSSH sshd では ssh-rsa が無効になっています。

$ 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など)は、より安全なxmssキーは最新のNIST論文で推奨されている

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

[email protected]

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

関連情報