
ssh man には次のように書かれています:
-i identity_file
Selects a file from which the identity (private key) for public key authentication is read. The default is
~/.ssh/identity for protocol version 1, and ~/.ssh/id_dsa, ~/.ssh/id_ecdsa, ~/.ssh/id_ed25519 and
~/.ssh/id_rsa for protocol version 2. Identity files may also be specified on a per-host basis in the con‐
figuration file. It is possible to have multiple -i options (and multiple identities specified in configura‐
tion files). If no certificates have been explicitly specified by the CertificateFile directive, ssh will
also try to load certificate information from the filename obtained by appending -cert.pub to identity file‐
names.
ID ファイルは秘密鍵であると記載されています。
しかし、秘密鍵を秘密にしておくというのはセキュリティ原則に違反するのではないでしょうか?
ssh がネットワーク経由でキーを送信すると、キーが侵害される可能性があります。
ターゲットマシンは秘密鍵を保持し、着信ユーザーの公開鍵をチェックすると思われます。
私の理解のどこが間違っているのでしょうか?
ssh がネットワーク経由で秘密鍵を送信する場合、パスワードだけを使用する場合と比べてどのような利点がありますか?
答え1
SSH は秘密鍵をネットワーク経由で送信することはありません。これは実際、愚かなことです。
秘密鍵は、対応する公開鍵を使用して生成されたターゲット ホストからの「チャレンジ」に応答するためにのみ使用されます。秘密鍵を持たずにチャレンジに応答することは非常に困難であるため、推測、つまりブルート フォースによって (許容可能な時間枠内で) 解読することができないため、この種の通信は安全です。