Knowledge Base
Adding an SSH private key to CodeGuard using cPanel
Overview
By the end of this article you will have generated, authorized, downloaded, and decrypted a Secure Shell (SSH) private key in cPanel and added it to your CodeGuard account so CodeGuard can securely back up your site.
You will activate SSH/Shell access in the cPanel Security section, create and authorize a key pair, then decrypt the private key in your terminal and paste it into your CodeGuard website settings. cPanel usually creates 2048-bit Rivest-Shamir-Adleman (RSA) keys, which work well for this purpose.
Steps
1. To enter a private key in your CodeGuard account, enter your cPanel for your hosting provider and activate SSH/Shell access in the Security section.
Figure 1: To enter a private key in your CodeGuard account, enter your cPanel for your hosting provider and activate SSH/Shell access in the…
2. Activate SSH/Shell access if it is not already. Click "Manage SSH Keys".
Figure 2: Activate SSH/Shell access if it is not already. Click "Manage SSH Keys"
3. Afterward, click "Generate a New Key" at the top of the page.
Figure 3: Click "Generate a New Key" at the top of the page.
4. Use the "Password Generator" to create a secure password. Make sure to copy and paste the password somewhere safe, you will need it later. Some host providers will show you a picture that is generated after the key is generated. You will not need this, so it’s okay not to copy that. Most default keys are 2048 RSA, which is perfectly fine.
Figure 4: Use the "Password Generator" to create a secure password. Make sure to copy and paste the password somewhere safe, you will need
5. Once your key is generated, authorize the Public Key it. Otherwise, it will not work even if you are able to decrypt it.
Figure 5: Once your key is generated, authorize the Public Key it. Otherwise, it will not work even if you are able to decrypt…
6. Select “Manage Authorization” under public keys.
Figure 6: Select “Manage Authorization” under public keys.
7. Then you simply click “Authorize” and you have your key ready to download and decrypt
8. Now that your key is authorized, click “View or Download” under "Private Keys" and download your key.
Figure 7: Now that your key is authorized, click “View or Download” under "Private Keys" and download your key.
9. Once you’ve done that you should be able to decrypt your key in your command prompt. If you cannot, send your key and it’s password to support and we can assist you in decrypting it. If you want to do it yourself, open your terminal and enter this command. "openssl rsa -in ~/Downloads/id_rsa -out ~/Downloads/id_rsa1decrypted"
Figure 8: Once you’ve done that you should be able to decrypt your key in your command prompt. If you cannot, send your key
10. If entered correctly you should be prompted to enter the password. Copy and paste it in, some terminals will not show that the password has been entered so paste it once and hit enter. If it does not work it is always best to go back ant restart the process. Afterward, you should see your decrypted file in your downloads folder. Copy the key in this file into the private key field in CodeGuard. You can enter it into the website settings of your website. Click Private key and paste in the decrypted key.
Figure 9: If entered correctly you should be prompted to enter the password. Copy and paste it in, some terminals will not show that…
Figure 10: After you enter the key, make sure to save the changes, so the key is being used in your backups.
After you enter the key, make sure to save the changes, so the key is being used in your backups.
Need assistance?
Contact our team for help with your purchase or issuing your certificate.