A Web.com Partner
Sign Up / Log In
Online Support Web Hosting

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:

  1. Create SSH Key
  2. Authorize SSH Key
  3. View, Download and Convert SSH Key

Create SSH Key

Here are detailed instructions on how you can create an SSH Key through your cPanel or Hosting Manager:

Step 1. Access your Hosting Manager.
Step 2. Scroll down to the Security, then click SSH Access option.
ssh access option via hosting manager
Step 3. Click the Manage SSH Keys button.
manage SSH Keys button
Step 4. Under Manage SSH Keys, click the Generate a New Key button.
generate a new key button
Step 5. If preferred, change the default Key Name (id_dsa) by replacing it with your own.
Generating public  key name
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.
set key name password
Step 7. If it's challenging, you can let the system create one for you by following these steps:

  1. Click the Password Generator button, next to the Strength Meter.
  2. In the pop-up box, copy the generated password and tick the box for I have copied this password in a safe place.
  3. Click Use Password. This will automatically copy and paste the generated password in the Password fields.

Important: Make sure to save the password in a safe and easy-to-recall place.

Step 8. Select Key Type and Key Size according to your preference. The recommended settings are Key Type: RSA and Key Size: 2048.
select key type and key size

Important: RSA is faster for authentication, while DSA is faster for key generation and signing.

Step 9. Click the Generate Key button to continue. A confirmation message will appear on the next page.
Key Generation Complete message

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.
manage public key
Step 3. Click on the Authorize button.
authorize button
A confirmation message will appear on the next page.
successfully auhtorize key

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.
vie/download private keys
Step 3. You are now viewing your SSH Key. Click Download Key to save it.
Download Key button for SSH Keys
Or, convert it to PPK format first: enter your SSH Key password in the field provided for passphrase and click Convert.
passphrase textbox to unlock id_dsa
Then, click Download Key to save it.
download key button ssh keys

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!

Was this helpful? Yes No 81% of people found this helpful.
{"message":""}