The most popular way to connect to a server via SSH is using username and password. To increase the security level and block any unauthorized access you can use the access with public and private key.
The public key will be set in the server and the private key in your own PC. When you try to connect, a secure connection will be provided by the comparison of the two keys.
Here is a short a guide on how to create a couple of keys and how to connect via SSH to a server using the client PuTTY. Some plans are already provided with the SSH access, for all the others, please, contact our sales support.
To generate the public key and the private key follow this simple procedure:
- Log-in to your cPanel control panel
- In the "Security" section, click on "SSH Access"
- Then, click on "Manage SSH Keys"
- Click on "Generate a new key" and fill in all the required fields, typing:
- Key Name: your keys couple's name
- Key Password: a security password
- Key Type: RSA
- Key size: 2048 - Click on "Generate a new key" to complete the procedure
- To authorize the new key, go back and click on "Management" and then on "Authorize"
- To connect to the server from your PC, download the private key
cPanel allows you to download the key in two formats: standard and PPK. If you use a ssh client from command line (such as Linux) you can download the standard format. If you use, following this guide, the client PuTTY, you have to convert it in PPK format. To make this procedure type your password to unlock the key and click on "Convert" - Download PuTTY and install it. As the client starts working, the page below will appear
In the "Host name" section, type the IP address, the server name or the domain name you are interested in. Type a name for your connection profile in the "Saved Sessions" field. Click on "Save" to save the previous settings - In the new window, go to "SSH" and click on "Auth"
- Click on "Browse" to upload your private key, previously downloaded from cPanel
- On the left, go to "Connection", click on "Data" and, in the "Auto-login username" field, type your cPanel username
- Go back to "Sessions", click on "Save", to save the whole configuration, and click on "Open", to start the connection. If the procedure is successfully processed you will see the image below:
- Click on "Yes" to confirm the encrypted connection (first time only). When the system connects, the private key's password will be required. Type it and click on "Enter": the access will be granted.
Now you can operate via command line in your cPanel account. For further informations on our hosting solutions please visit our website.