How do I connect in via SSH When I'm using Linux?

Beanie

Last Update a year ago

We're glad you asked!


Wherever you see double quotes " " please always leave them out when you use the information in this article.


  1. Please login to your cPanel Account
  2. Type "ssh" into the cPanel Search Tools box 
  3. Select SSH Access
  4. Click Manage Keys
  5. Click generate a new key (we don't accept password authentication on its own for security reasons)
  6. Provide a password that you will be prompted for when you use the key (this password will be independent of your cPanel account password)
  7. Click Generate Key
  8. Go back and click manage and authorise the key that you've just created (it won't work otherwise!). 
  9. Download your private key (For Linux Users, please place this in "/home/yourlinuxusername/.ssh" (Without quotes). (Please be careful not to download the public key as that should stay solely on the server.
  10. In your terminal (not on the server), navigate to your "/home/yourlinuxusername/.ssh" directory (without quotes) and run "chmod 600 id_rsa" (without quotes). If you've given your rsa key a different name, please read the additional important information below this numbered list.
  11. Next you can use the command in terminal: ssh -p 1014 [email protected]
  12. You'll be prompted for the password that you created in step 6. 


Please Note: If you change the name of the key to anything other than id_rsa at the time of creation, you'll need to specify the key name within the command instead of the command at step 11 (where you don't - there's an example coming up below!). 


So, if you've changed the name of your ssh key from id_rsa to harry_rsa for example, your cPanel username was harrycp and your website was google.co.uk


You'd need to replace "id_rsa" in step 10 with "chmod 600 harry_rsa" (without quotes). 


To connect (instead of step 11), you'll need the following command:


"ssh -i /path/to/harry_rsa -p 1014 [email protected]" (without quotes). You'd then proceed with the password at step 10 (the one you gave your certificate when you created it). 


You can find your cPanel username from within your account, when you first log in, in the first information box - it's called "current user" and it comes before the brackets. If you are somewhere else within cPanel, please click "tools" on the left sidebar.


->The password that is requested is different from your cPanel password. Your cPanel password and your SSH Key password are independent of each other unless you've deliberately left them the same. We recommend that they are different. You can use cPanel's password suggestion tool, whenever you set a password in cPanel, to ensure great security for your website hosting and Email management. 


If you have any questions, you are welcome to raise a support ticket from your client area, use online chat or please feel free to telephone us. 


Hopefully this is helpful! 

    Was this article helpful?

    0 out of 0 liked this article

    Still need help? Message Us