The SSH network protocol allows you to connect to another web server over the internet via a command-line interface (CLI). You can use this network protocol to remotely manage your server, configure CGI scripts, and perform other tasks. Your SSH session can be authenticated either with the username and password or with a pair of private/public keys. It is recommended to use the latter, as it is considered to be a more secure and convenient solution.
- Log in to cPanel.
- In the SECURITY section of the cPanel home screen, click SSH Access.
- Click on Manage SSH keys.
- Create a new pair of SSH keys.
Configuring SSH keys For cPanel Basic Theme:
- In cPanel you can manage SSH keys in the SSH access menu.
- Click on Manage SSH keys.On the next page, you can either import the existing pair of keys or generate a new one.
- Create a new pair of SSH keys.3.1 Public and private keys generation in order to generate a new SSH key pair click on the Generate a new Key option.On the generator page, specify the password (passphrase), Key Name, Key Type and Key Size.DSA keys provide quicker key generation and signing times.RSA keys provide quicker verification times. The maximum allowed DSA key size is 1024 which is not enough to guarantee its security nowadays. That’s why we suggest using only RSA with 2048 bits.
Once everything is set, click Generate Key. Now you should see both private and public keys you created.
3.2 Public key authorization.
In order to authorize SSH access to your hosting account by the private key you created, click on the Manage option.
On the next page, click on the Authorize button.
3.3 Acquiring a key pair.
You can view and download keys you have in cPanel by clicking on the View/Download button.
Click on Download Key or just copy/paste the provided key if needed. You can also convert your key into PuTTY’s ppk format using the Convert option.
- Use Putty and SSH key pair to connect
In this example, we will use the Putty SSH client and key pair generated by cPanel in order to access the server via SSH.4.1 Download the Private key as it is mentioned under Acquiring a key pair ( in step3.3)4.2 In the PuTTy folder, run puttygen.exe.In the top menu select the File tab and click on Load private key and select your private key file (make sure All files (*.*) filter is used so you can see your downloaded private key file
Asked for the passphrase you specified during the key generation in step 2.1. After entering it you should receive a successful import message.
In case you do not wish to set a passphrase for the key, you can empty the Key passphrase and Confirm passphrase fields.
4.3 Now click on Save private key and save your key as a .ppk file which will be needed later.
4.4 Run the PuTTy client (putty.exe), select Connection > SSH > Auth and in the Authentication parameters section, click on Browse to select the saved .ppk file.
Once done, get back to the Session section and input the server name (IP address) and specify the SSH port and click Open.
4.5 In the console window, you will be asked for the login and passphrase.
Remember to always keep your private keys safe. You can use the same key from multiple computers if you wish, or generate new ones on each client connecting to your server for added security. Each user should generate their own key pair and passphrase for secure access control.