- Create an RSA Key Pair
# ssh-keygen
The command will create a 2048-bit RSA key pair by default.
You can also create a larger 4096-bit key by entering -b 4096
The command produces this output:
Generating public/prive rsa key pair.
Enter File in which to save the key (/your_home/.ssh/id_rsa):
Press Enter to save the key pair into .ssh/, or you can specify another location to save your key.
2. Create a passphrase
You will be prompted to create a passphrase for your SSH key. Press Enter to leave it blank and use only the key to establish SSH connections. Enter a password for an additional security layer.
3. To display your public key enter the command below:
cat ~/.ssh/id_rsa.pub
The generated key will begin with ssh-rsa.
You can now copy and paste your public SSH key to your Shell console, or any server, to establish a secure connection.
Comments
0 comments
Please sign in to leave a comment.