After running ssh-keygen and accepting the default values, the following files are changed or created in the user’s home directory under the .ssh subdirectory:
~/.ssh/id_rsa: This file contains the private key of the user, which is used for authenticating the user to a remote server. The private key is encrypted with a passphrase, which can be left empty for convenience, but this is not recommended for security reasons. The private key should be kept secret and protected by the user, and should not be copied or shared with anyone else.
~/.ssh/id_rsa.pub: This file contains the public key of the user, which is used for verifying the user’s identity by the remote server. The public key can be copied and distributed to any server that the user wants to access via SSH. The public key can also be appended to the ~/.ssh/authorized_keys file on the remote server, which allows the user to log in without entering a password.
The other options are not correct. There is no file called ~/.ssh/id_rsa.key, ~/.ssh/id_rsa.prv, or ~/.ssh/id_rsa.crt created by ssh-keygen. The .key, .prv, and .crt extensions are not used by ssh-keygen, and they may be confused with other types of keys or certificates.
References:
How to Use ssh-keygen to Generate a New SSH Key?
How To Set Up SSH Keys
SSH Essentials: Working with SSH Servers, Clients, and Keys
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit