macOS 13 VenturaではOpenSSH 9.0が同梱され、SHA-1ハッシュを使用したRSA署名がデフォルトで無効となっているので注意を。

macOS 13 VenturaとmacOS 12 MontereyのOpenSSHとLibreSSLのバージョン macOS 13 Ventura
macOS 13 VenturaとmacOS 12 MontereyのOpenSSHバージョン
記事内に広告が含まれています。
スポンサーリンク
スポンサーリンク
スポンサーリンク

 macOS 13 VenturaではOpenSSH 9.0が同梱され、SHA-1ハッシュアルゴリズムを使用したRSA署名がデフォルトで無効となっています。詳細は以下から。

ターミナルアイコン

 Appleが2022年10月にリリースしたmacOS 13 Venturaでは、phpに続きPythonランタイムの同梱が終了されていますが、同じくVenturaではSSHコマンドで利用されているOpenSSHがmacOS 12 Montereyの「OpenSSH 8.6」から「OpenSSH 9.0」へアップデートされています。

macOS 13 VenturaとmacOS 12 MontereyのOpenSSHとLibreSSLのバージョン

macOS 13 VenturaとmacOS 12 MontereyのOpenSSHバージョン

 このOpenSSH 9.0がデフォルトとなったmacOS 13 Venturaでは、Montereyからのアップグレード後に一部のサーバーへssh接続しようとすると以下のようなエラーが出て接続できなくなっています。

Permission denied (publickey).

hoge@hoge.com: Permission denied (publickey).

 これは2021年09月にリリースされた「OpenSSH 8.8」で、SHA-1ハッシュアルゴリズムを使用したRSA署名が廃止されたことによるもので、リリースノートやSuper Userでは一時的な対処法として”~/.ssh/config”ファイルに”HostkeyAlgorithms +ssh-rsa…”を追加する方法が紹介されていますが、あくまでも一時的な対処法で、最終的にはECDSAやEd25519などに切り替える事が推奨されています。

This release disables RSA signatures using the SHA-1 hash algorith by default. This change has been made as the SHA-1 hash algorithm is cryptographically broken, and it is possible to create chosen-prefix hash collisions for USD$50K [1]

Host old-host
        HostkeyAlgorithms +ssh-rsa
	PubkeyAcceptedAlgorithms +ssh-rsa

We recommend enabling RSA/SHA1 only as a stopgap measure until legacy implementations can be upgraded or reconfigured with another key type (such as ECDSA or Ed25519).

Release Notes – OpenSSH

コメント

タイトルとURLをコピーしました