How to configure SSH keys using cPanel


Cheap reseller Hosting


Configuring SSH keys using cPanel involves generating a key pair on the server and adding the public key to your server’s authorized keys file. Here’s a breakdown of the steps:

Generating a Key Pair on cPanel:

  1. Log in to cPanel.
  2. Navigate to the Security section and find the SSH Access tool.
  3. Click on Manage SSH Keys.
  4. Click on Generate a New Key.
  5. You can choose a name for the key pair or leave the default “id_rsa”.
  6. Optionally, set a strong password for the key and click Generate Key.

Adding the Public Key to Authorized Keys:

  1. In the Manage SSH Keys section, you need to scroll down to the Authorized Keys area.
  2. Next, you have to click on Manage next to the key you just generated.
  3. A box with the public key will be displayed. You can copy the entire contents of the box.
  4. Here you’ll need to access your server through another method (like root access or a current SSH connection) and add the copied public key to the authorized_keys file located in the .ssh directory of your home directory.

Downloading the Private Key (for SSH client):

  1. Go back to the Manage SSH Keys section in cPanel.
  2. Find the key you have created under Private Keys.
  3. Click View/Download next to the key.
  4. You’ll see the option to convert the key to PPK format (if using PuTTY). Then, you have to choose the conversion if needed.
  5. Click on Download Key and save the private key securely on your local machine. This private key will be used for SSH login with your client program.

Tips:

  • Make sure to keep your private key confidential and avoid sharing it with anyone.
  • Consult your SSH client’s documentation for specific instructions on using the private key for login.

For a more detailed walkthrough, you can refer to resources like the cPanel documentation or tutorials from web hosting providers.


Cheap web Hosting