SSH login using an SSH key is the most secure way to log in to an SSH session. You may simply want a way to secure your server interaction or disable the SSH password login option on your server altogether. Whatever the reason, you may log in to your cPanel account using the SSH key. But also keep in mind that, to access SSH, you need to enable SSH login access for your cPanel account by contacting your hosting provider.
If you have bought hosting from us, open a support ticket to request SSH access for your cPanel account. Now, to set up SSH Key login, follow these steps:
1. First, log in to your cPanel and click on the “SSH Access” icon from the “Security” section.
2. Now click on the “Manage SSH Keys” button and click on the “Generate a New Key” button to generate a new key.
3. Type any name in the “Key Name” field.
Type Secure Password instead of Key Password and Reenter Password or generate the password by clicking on the “Password Generator” button and save it.
4. Clicking on the “Generate Key” button without changing anything else will create an SSH Key. Now go back to the previous page by clicking on the “Go Back” button.
5. To convert your Public Key to “Putty” software compatible key, scroll down to “convert” and click on the “View / Download” button from the Private Keys section to convert to “.pkk” format. . Then click on the “Download Key” button to download and go back to the “Go to Manage Keys” page.
6. Finally, to enable SSH Key, click on the “Manage” button from the Public Keys section and then click on the “Authorize” button.
Logging into SSH using the Putty SSH client.
- Download and install putty from here
- Open the putty software and go to “SSH > Auth.”
- Click on the “browse” button and browse for the private key that you have downloaded on the previous 6th step and open it.
- Now get back to the “Session” tab and enter your server credential in cpanel Username@serverAddress in the “Hostname or IP Address” box. Here cPanel username is your cPanel login username and serverAddress is the server IP address or hostname for your cPanel account.
- On the SSH Port field, enter the correct SSH port for the cPanel server. You may get the SSH port, server hostname etc. from your hosting provider.
- Optionally, you may save your correct details by entering a name in the “Saved Sessions” and clicking on the Save button beside it.
- Finally, click on the “Open” button and your SSH session will start (If you have set a passphrase for the SSH key, it may ask for it in this step and that is it!)