日々精進

新しく学んだことを書き留めていきます

sshでログインしようとすると「Unable to negotiate with xxx port 22: no matching host key type found. Their offer: ssh-rsa,ssh-dss」エラー

原因は最近のopensshが古い形式の秘密鍵をサポートしなくなったこと。openssh 8.3ではエラーが出なかったが8.8だとエラーになった。 以下の設定を接続設定に追加すると直った。

HostKeyAlgorithms ssh-dss,ssh-rsa
PubkeyAcceptedKeyTypes ssh-dss,ssh-rsa

参考:

akashima.net