How to Configure SSH Key on cPanel
SSH (Secure Shell) is a protocol that provides a secure method to access another computer or server. Connection via SSH comes with encrypted data and a strong verification used between computers or servers over an unreliable network. It's prevalent for managing applications and systems remotely, and moving files from one computer to another by logging into another computer. When using SSH, login credentials, commands, and texts are encrypted.
You can easily configure an SSH Key on your cPanel by following these steps:
Create SSH Key
Here are detailed instructions on how you can create an SSH Key through your cPanel or Hosting Manager:
Step 1. Log in to your cPanel.
Step 2. Scroll down to the Security, then click SSH Access option.
Step 3. Click the Manage SSH Keys button.
Step 4. Under Manage SSH Keys, click the Generate a New Key button.
Step 5. If preferred, change the default Key Name (id_dsa) by replacing it with your own.
Step 6. Enter Key Password twice in the respective fields.
Make sure to create a strong password. The Strength Meter will tell you if your password is weak or strong.
Step 7. If it's challenging, you can let the system create one for you by following these steps:
- Click the Password Generator button, next to the Strength Meter.
- In the pop-up box, copy the generated password and tick the box for I have copied this password in a safe place.
- Click Use Password. This will automatically copy and paste the generated password in the Password fields.
Step 8. Select Key Type and Key Size according to your preference. The recommended settings are Key Type: RSA and Key Size: 2048.
Step 9. Click the Generate Key button to continue. A confirmation message will appear on the next page.
Now that you've created your SSH Key, you will have to authorize it before you can use it.
Authorize SSH Key
Follow the instructions below to authorize the SSH Key you just created in your cPanel or Hosting Manager:
Step 1. Click on the Go Back button at the bottom of the page, to return to the main SSH Access page.
Step 2. The newly-created SSH Key will appear under Public Keys. Click the corresponding Manage button on its right side.
Step 3. Click on the Authorize button.
A confirmation message will appear on the next page.
Your SSH Key has now been authorized and can now be used for access.
View, Download and Convert SSH Key
Follow the instructions below to learn how you can view or download the SSH Key on your cPanel or Hosting Manager, or convert it to PPK format before downloading:
Step 1. Click on the Go Back button at the bottom of the page, to return to the main SSH Access page.
Step 2. Under Private Keys, click on the View/Download button corresponding to your newly-created SSH Key.
Step 3. You are now viewing your SSH Key. Click Download Key to save it.
Or, convert it to PPK format first: enter your SSH Key password in the field provided for passphrase and click Convert.
Then, click Download Key to save it.
Congratulations! You just learned how to configure SSH Keys on your cPanel. Now, you can log into the server using SSH Keys. Follow the steps in this guide to learn How to Connect to SSH on cPanel Using SSH Keys here. If you need any further assistance, or if you have any questions, please let us know. We’d love to help!