SSHクライアントで-iオプションで秘密鍵を指定するのはなぜですか?

SSHクライアントで-iオプションで秘密鍵を指定するのはなぜですか?

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.

アイデンティティ文書は秘密鍵であると記載されています。

しかし、これは秘密鍵の機密性のセキュリティ原則に違反するものではありませんか?

SSHがネットワーク経由で鍵を送信すると、破損する可能性があります。

ターゲットコンピュータは秘密鍵を保持し、着信ユーザーの公開鍵を確認したいと思います。

私の理解に問題がありますか?

sshがネットワーク経由で秘密鍵を送信する場合、パスワードを使用するよりもどのような利点がありますか?

ベストアンサー1

SSH はネットワーク経由で秘密鍵を送信しません。実際、それは愚かなことです。

秘密鍵は、その公開鍵を使用して生成されたターゲットホストの「チャレンジ」に応答するためにのみ使用されます。秘密鍵を保持せずに問題に答えるのは非常に困難です。推測を介して(許容される時間内に)損傷することはできないため、この通信は安全になります。無差別的な力。

おすすめ記事