Support Center

Adding an SSH private key to CodeGuard using cPanel

  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.
  2. Activate SSH/Shell access if it is not already.. Click "Manage SSH Keys".     
  3. Afterwards 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. You will not need this, so it’s okay not to copy that. Most default keys are 2048 RSA, which is perfectly fine.  
  5. Once your key is generated, authorize the Public Key it. Otherwise it will not work even if you are able to decrypt it.
  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.
  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@codeguard.com 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"
  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. Afterwards 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. 
  11. After you enter the key, make sure to save the changes so the key is being used in your backups.

See our blog post on adding a website using key-based authentication for more information on key-based authentication and the complete steps necessary to add your website using a key.

Contact Us