- Create an RSA Key Pair
The command will create a 2048-bit RSA key pair by default.
You can also create a larger 4096-bit key by entering
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:
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.