非常に奇妙なSSHknown_hosts証明書の検証に失敗しました

非常に奇妙なSSHknown_hosts証明書の検証に失敗しました

私は最近私のコンピュータの1つを最新のUbuntu 22.04にアップグレードしましたが、非常に奇妙なSSHサーバー認証の問題が発生しました。状況の簡単な説明は次のとおりです。

サーバーとクライアントの両方にSSH証明書ベースの認証を使用しています。クライアント認証は正しく機能しますが(サーバーにクライアントTrustedUserCAKeys認証がある)、サーバー認証は機能しません。私はそれを持っていますが@cert-authority *.example.com ecdsa-sha2-nistp521 AAAAE2VjZHN.../etc/ssh/ssh_known_hosts正しく読み取られ、straceを通して確認されます)、何らかの理由で正しく使用されません。あるいは、実際に使用することもできますが、サーバーはクライアントに証明書を送信しません。この問題は、最新バージョン(SSH-2.0-OpenSSH_8.9p1 Ubuntu-3ubuntu0.1)を使用しているクライアントでのみ発生しますが、以前のバージョン(SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.10)では正しく機能します。以下は、古いクライアントと新しいクライアントのSSHデバッグログから抜粋したものです。

新しいクライアントデバッグログ:

debug1: Local version string SSH-2.0-OpenSSH_8.9p1 Ubuntu-3ubuntu0.1
debug1: Remote protocol version 2.0, remote software version OpenSSH_8.9p1 Ubuntu-3ubuntu0.1
debug1: compat_banner: match: OpenSSH_8.9p1 Ubuntu-3ubuntu0.1 pat OpenSSH* compat 0x04000000
debug1: Authenticating to my.example.com:22 as 'myuser'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server->client cipher: [email protected] MAC: <implicit> compression: none
debug1: kex: client->server cipher: [email protected] MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: SSH2_MSG_KEX_ECDH_REPLY received
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:+JwFUaD...

古いクライアントのデバッグログ:

debug1: Local version string SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.10
debug1: Remote protocol version 2.0, remote software version OpenSSH_8.9p1 Ubuntu-3ubuntu0.1
debug1: match: OpenSSH_8.9p1 Ubuntu-3ubuntu0.1 pat OpenSSH* compat 0x04000000
debug1: Authenticating to my.example.com:22 as 'myuser'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: [email protected]
debug1: kex: host key algorithm: [email protected]
debug1: kex: server->client cipher: [email protected] MAC: <implicit> compression: none
debug1: kex: client->server cipher: [email protected] MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host certificate: [email protected] SHA256:+JwFUaD..., serial 10356 ID "my.example.com server certificate" CA ecdsa-sha2-nistp521 SHA256:KlV0xkm... valid from 2023-05-30T12:18:00 to 2023-06-06T12:19:31
debug1: Host 'my.example.com' is known and matches the ECDSA-CERT host certificate.
debug1: Found CA key in /etc/ssh/ssh_known_hosts:1

見てわかるように、サーバーが期待した代わりに送信Server host keyしましたServer host certificate。私が見ることができる唯一の違いは、新しいクライアントがkexアルゴリズムを使用しているのcurve25519-sha256に対して、古い(機能的な)クライアント[email protected]は同じでなければならないことです。ただ新しい名前ができました。

ここで何が起こるのか知っている人はいますか?サーバーとクライアントの署名CAはどちらもecdsaキーです(違いがある場合)。

ベストアンサー1

おすすめ記事