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.
How can I generate SSL from cPanel with AutoSSL?
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!)