How to create a SSH key set

If your SSH server is visible over the Internet, you should use public key authentication instead of passwords if at all possible.  Generating it is fairly straigh-forward...

Visit your cPanel and head up for the Security section.  In that section, you'll find an icon named "SSH/Shell Access". 


Step 1
Click on "Manade SSH Keys" and then on "Generate a new key".  Let's now answer the mandatory questions:

Key Name (defaults to id_dsa): <choose a familiar, easy to remember single-worded name>
Key Password: <type a secure password>
Password (Again): <retype the previous password>

Then hit "Generate key"


Step 2
Back in the "Manage SSH Keys", scroll down to the "Public Keys" and click on the "Manage Authorization" link visible on the right of your newly created key.

In the following page, you only need to click on the "authorize" button.


Step 3
Back in the "Manage SSH Keys", scroll down to the "Private Keys" and click on the "View/Download" link visible on the right of your newly authorized key.

Save this key on your computer and do the following:

OS X and Linux
Save your key in the ~/.ssh/ folder (you may have to create it if it doesn't exists yet)

You now have to set the proper permissions on it so let's chmod it to 0700 by pasting this command in your terminal:
chmod 0700 ~/.ssh/

The keys should have the following permissions:
Public key: 0644
Private key: 0600
Config File: 0600

Lastly, the authorized_keys file should have a 0600 permission.

MS Windows
Before downloading the key, you must convert it to the PPK format by typing your passphrase (if applicable) and then hitting the "Convert" button.

You may now save it on your computer.



You should now be able to access your server using SSH


  • 1 Users Found This Useful
Was this answer helpful?

Related Articles

How to authorize your SSH key on cPanel

Login to cPanel and search for SSH : or scroll down and find the 'SSH Access' option:...

Configure your SSH client on Apple

You may ease up the use of SSHing to your server by configuring your SSH client.  To do so,...

Configure your SSH for GIT

You may ease up the use of SSHing to your git repo by configuring your SSH.  To do so,...

Recommended firewall

What firewall do you recommend to secure my Linux server? MACI recommends the CSF (ConfigServer...

Force your SSH client to use password authentification

From time to time, you may need to force SSH client to use password authentication instead of...