Summer Sale! Save 15%
on any Shared Hosting Plan & Location.
 View More

How to Generate and Use SSH Keys

Step by Step tutorial on creating and using SSH Keys for secure connection to the server

Warning!

The Quick Access options provided in the Client area which were used in making of this tutorial will soon be discontinued. To see how to do this and more visit our How to Manage SSH Keys cPanel tutorial.

 

SSH (Secure Shell) is a network protocol that provides the user with a secure connection to a network. However this method requires a Key that makes the connection encrypted and a client like PuTTY to access the network with the key.

 

There are two types of algorithms with which you can generate SSH Keys – RSA and DSA. The RSA is and encrypt/decrypt method and is based on the factoring principle while the DSA is a singing/verification method based on the discrete logarithm principle. DSA keys are slower in encryption but faster in decryption while RSA keys have it in reverse.

 

The other factor you must consider is the bit length. More bits equal stronger but slower encryption/decryption. Although in most cases the extra time is points of a second. You will be able to choose between 1024bit, 2048bit and 4096bit.

 

Recent news of 1024bit keys being cracked in 100 hours and official security standards emphasizing on the vulnerabilities of such keys has led most users to switch to 2048bit and 4096bit keys (some applications do not work with 4069bit keys). On theory both methods are secure but most users nowadays prefer 2048bit/4096bit RSA keys.

 

Step 1 Find the SSH Access menu

To access the SSH Access menu for your hosting account, you will need to navigate to the Products>My Products section of your client area.

 

 

Now select the product/plan for which you want to activate SSH and open the View Details>View Details section.

 

 

Now select SSH Access from the list of options.

 

Navigating to the SSH Access menu

 

Step 2 Create and Authorize SSH Keys

Click on the Create button to create a new SSH key.

 

Choosing the Create option for a new SSH Key

 

A new window will open with the configuration of the key which you must setup:

 

  • Key Name – The name of the key for internal recognition
  • Key Password – A password to protect the key
  • Key Type – Here you can choose between DSA and RSA
  • Key Size – Choose between 1024, 2048 or 4096bit length

 

Configuring the SSH Key parameters and Generating it

 

Click on the Create button when you are ready to proceed.

 

As Keys work in pairs you will have a new public and private key being created with the same name. You will need to authorize the Public key for the Private key you want to use.

 

Authorizing a new SSH Key

 

Click on the Checkmark icon to authorize the key and click the Confirm button when you are prompted.

 

Step 3 Use the SSH Key

You will also have to change the format of the SSH key to Putty Private Key (.ppk) as PuTTY only works with this file format. To do this, click on the key icon for the private key.

 

Choosing the Convert to PPK option for this key

 

Type the SSH Key password and click on the Convert button to change the file format.

 

Converting SSH Key to PPK format

 

Now download the private key to your local computer by clicking on the download icon.

 

Next you will have to open PuTTY, configure a new session and navigate to the SSH>Auth section where you can browse for the key file on your local computer and click open.

 

Uploading the SSH key to PuTTY

 

To save this setting so you can use the key every time, go to the Session section and save the session’s configuration.

 

Step 4 Import SSH Key

To import a key, you will need to click on the Import button in the main SSH Access menu.

 

Choosing the SSH Key Import option

 

You will have to Provide a Key Name for this new key, the Key’s Password and the Private Key itself, so the system can reverse-generate the public key and add both of them to your account, for easy management.

 

Configuring and Importing a new SSH Key

 

Congratulations, now you can fully manage the SSH Keys for your account.