MacOS を Ventura にアップグレードしたらSSH接続できなくなった。
すべてのサーバーではない。
どうやらCentOS6 など古いサーバーへの接続において
Unable to negotiate with xxx.xxx.xxx.xxx port 22: no matching host key type found. Their offer: ssh-rsa,ssh-dssのようなエラーで接続できない。
解決策として ~/.ssh/config の冒頭に
HostKeyAlgorithms=+ssh-rsa
PubkeyAcceptedAlgorithms=+ssh-rsaを追記して解決。
本来は host ごとに
host CentOS6
StrictHostKeyChecking no
HostName xxx.xxx.xxx.xxx
User hoge
Port 22
IdentityFile ~/.ssh/id_rsa
HostKeyAlgorithms=+ssh-rsa
PubkeyAcceptedAlgorithms=+ssh-rsaにするのが好ましいのだけど面倒なので冒頭に追記して解決。
参考サイト
ありがとうございます。
