SSH/SCP into cPanel

It is very useful to be able to SSH into cPanel for a number of reasons. One such reason is the ability to make use of Git. Another benefit is that you can copy files to your cPanel account securely using SCP.

In order to make use of SSH with your cPanel account, your hosting provider will need to enable "Shell Access" in WHM for your hosting package. If your hosting provider doesn't allow this, then look no further 🙂 Let's get started!

Login to your website's cPanel, and scroll to the security section as shown in the screenshot below. Click on SSH Access


Next, click on Manage SSH Keys


Next, click on Generate a New Key


Fill in the Key Name, and Key Password (optional). Though the Key Password is optional, we recommend using this as it adds an extra layer of security should someone manage to get their grubby paws on your private key 🙂 Click on Generate Key once complete.


Your SSH key will now be generated. By default cPanel does not authorize generated keys. As such, click on the Manage button next to your newly generated SSH key, and then click on Authorize


Next, download your newly generated SSH key by clicking on View/Download


Next, click on Download Key next to your private key


Please keep your private key safe. If someone gets hold of your private key, they will have access to your website's cPanel.

Note – The permissions of the download SSH key often don't work out the box and we end up changing the permissions on Ubuntu to 400 with the following command:

sudo chmod 400 your_key