Generate SSH Key to Access Database in Linux
Step 1 - Run the ssh-keygen -t rsa command
You can use the -t
option to specify the type of key to create.
For example, to create an RSA key, run: ssh-keygen -t rsa
Step 2 - Save file
The command prompts you to enter the path to the file in which you want to save the key.
A default path and file name are suggested in parentheses. For example: /home/
user_name
/.ssh/id_rsa
. To accept the default path and file name, press Enter. Otherwise, enter the required path and file name, and then press Enter.
Step 3 - how to read generated rsa file
if the file name of the SSH private key is id_rsa
, the file name of the public key would be id_rsa.pub
private key using Syntex cat in command prompts /terminal.
Read cat id_rsa.pub or
/Users/admin/ cat .ssh/