Use the key pair ~/.ssh/id_rsa and ~/.ssh/id_rsa.pub.
Apply the correct handling for authentication.
Which statement is correct?
id_rsa is the private key and stays protected on the client. id_rsa.pub is the public key copied to the server's authorized_keys.
Detailed explanation
Incorrect. The private key must not be copied to authorized_keys.
Incorrect. The private key must not be copied to authorized_keys.
Incorrect. The private key must remain secret and the public key is the one distributed.
Incorrect. The private key must remain secret and the public key is the one distributed.
Correct. Keep id_rsa private and register id_rsa.pub on the destination.
Correct. Keep id_rsa private and register id_rsa.pub on the destination.
Incorrect. This pair is used for user authentication, not only host keys.
Incorrect. This pair is used for user authentication, not only host keys.
Try it yourself
An example you can run in a temporary verification environment.
ssh-keygen -lf ~/.ssh/id_rsa.pubExpected result
公開鍵が存在する場合はfingerprintを表示し、秘密内容は表示しないKey points
- Private key
- Public key
- Never distribute the private key
Notes
- Environment: OpenSSH 9.x
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.