OpenSSH serverがclientへ自hostのidentityを証明するために使うEd25519 host key pairを選ぶ。
個人userのlogin keyではない。
適切な組はどれか。
/etc/ssh/ssh_host_*_keyはserverのhost identity private keyで、.pubがpublic keyである。clientはknown_hostsでそのidentityを検証する。
詳細解説
/etc/ssh/ssh_host_ed25519_key と /etc/ssh/ssh_host_ed25519_key.pubserver host identity用のprivate/public key pairである。
正しい。/etc/sshのssh_host_ed25519_key pairはsshdがhost identity証明に使用する。
~/.ssh/id_ed25519 と ~/.ssh/id_ed25519.pub通常はclient user identity key pairである。
誤り。user homeのid_ed25519 pairは通常client user authentication用である。
~/.ssh/authorized_keys と ~/.ssh/known_hostsauthorized client keysとknown server keysのdatabaseでpairではない。
誤り。authorized_keysとknown_hostsは異なる方向のtrust databaseで、private/public pairではない。
/etc/ssh/sshd_config と /etc/ssh/ssh_configserver/client設定fileでcryptographic key pairではない。
誤り。sshd_configとssh_configはconfiguration fileでcryptographic key materialではない。
実際に確かめる
一時的な検証環境で実行できる例です。
printf '%s
' '/etc/ssh/ssh_host_ed25519_key=server private host key' '.pub=server public host key'期待される結果
/etc/ssh/ssh_host_ed25519_key=server private host key
.pub=server public host key理解のポイント
- host identity
- private keyはserverだけ
- user identity keyと区別
確認時の注意
- 確認環境: OpenSSH key file役割対応表
基礎のおさらい
private host key
serverだけが保持し厳格に保護する。漏洩時はkey交換とclient側known_hosts更新が必要になる。
複数algorithm
serverは複数host key typeを持てるが、client/serverのalgorithm policyにより選択される。