Generating a SSH key

A SSH key allows you to connect via SSH in a secure way without needing a password. To use it, you need to generate a SSH key and install it on the server, as well as installing the Private Key on your computer. You will then be able to log in via SSH in the most secure way possible.


  • Access to cPanel

Completion of the task: 10 minutes

Expertise: expert

How to do it?

1. Log in to your cPanel account

2. In the Security section, click on SSH Access.

3. In the next page, choose Manage SSH Keys.

4. Click on "Generate a New Key", and fill the following fields:

  • Key Name: Leave the default value
  • Key Password: Attention, it is important to create a strong password and to remember it. For instance, you can use your cPanel password.
  • Key Type: RSA
  • Key Size: 4096

You can then click on "Generate Key".


4. You will get an image of your key!

5. Go back to SSH Key section, and under Public Keys, choose Manage for the key you just created. Click on "Authorize". This will install your key on the server.

6. It is time to download the Private Key, which you will then install on your computer. Under Private Keys, click on View/Download for the key you just created.

7. Save the key in your computer

If you use Linux or Mac OS

Simply click on "Download Key". You just have to move this file to the following location:


For Mac OS: In the Finder window, press Command-Shift-G. It’ll ask you what folder to navigate to. Enter “~/.ssh” and press return.

If you use Windows

You can use Putty, scroll down and follow the instructions to convert the key to PPK format. You will then be able to download the Private Key.

You just have to import the Private Key to Putty. Browse to select mykey.ppk in the “Private key file for authentication” text box. Be sure to go back to the Session window and click Save to update the profile.


8. To connect via SSH to the server, you can now follow this procedure.

Log into cPanel

Using an SSH connection



Please sign in to leave a comment.