1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

AlmaLinux9でOpenSSL version mismatch

1
Last updated at Posted at 2025-09-09

事象

virtual box上でAlmaLinux9をインストールし、postgres、contribをインストールした際、
その後のsshに失敗。

sshdが起動せず、バージョンミスマッチのメッセージあり。

[13:27:18 root@almalinux9 ~]
$ sshd -t
OpenSSL version mismatch. Built against 30000070, you have 30200020
[13:29:08 root@almalinux9 ~]
$ openssl version
OpenSSL 3.2.2 4 Jun 2024 (Library: OpenSSL 3.2.2 4 Jun 2024)
[13:30:30 root@almalinux9 ~]
$ rpm -q openssl
openssl-3.2.2-6.el9_5.1x86_64

対処

dnf upgrade
dnf reinstall openssh-server

原因

OpenSSL の実体(共有ライブラリ)だけが新しくなり、
sshd 本体(openssh-server)がそれより古い OpenSSL でビルドされたままになった。

Built against 30000070 → OpenSSL 3.0.7 でビルドされた sshd
you have 30200020 → 実行時に読み込まれたのは OpenSSL 3.2.2(実際に openssl-3.2.2-6.el9_5.1 が入っている)

つまり ライブラリだけ 3.2 系に上がり、sshd は 3.0 系想定のまま。
この差分を sshd が検知して「version mismatch」となり、起動に失敗。

→なぜ「postgres/contrib を入れた後」に出た?
恐らくインストールの過程での依存解決で、OpenSSLを含むベースパッケージが更新された。
一方で、openssh-server が同タイミングで更新されなかった/再起動されなかった、はず。

          (ビルド時)                        (実行時)
  ┌──────────────────┐              ┌─────────────────────┐
  │  sshd (openssh)  │ ←────────→   │ libcrypto.so.3      │
  │  Built with      │              │ from openssl-3.2.2  │
  │  OpenSSL 3.0.7   │              │                     │
  └──────────────────┘              └─────────────────────┘
             ↑
             │ mismatch !!
             │
     「想定3.0.7」 ≠ 「実体3.2.2」
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?