How to enable SSH access and connect to your hosting account

SSH, or Secure Shell, is a cryptographic network protocol designed to securely connect two devices over an unsecured network. It facilitates encrypted communication, ensuring that data transmitted between devices remains confidential and protected from potential eavesdropping.

While traditional methods use username and password combinations, employing SSH keys enhances security and convenience.

How to enable SSH Access

To initiate SSH access, you first need to enable SSH access for your hosting account. You can do that from the Manage Shell menu within cPanel.

To enable SSH:

  1. Log in to your cPanel account.

  2. Navigate to the Exclusive section.

  3. Click on Manage Shell:


    NOTE: The menu can also be accessed from your Spaceship account > Hosting Manager > click “Manage” > “Advanced” > the “Other tools” menu > click Manage SSH:


  4. By default, SSH access is turned off for hosting accounts. You can toggle this in the Manage Shell interface opposite the “Enable SSH access” option:


  5. To activate SSH for your cPanel account, click the toggle (1).

    Once enabled, you will see the “Access Details” table (2) with the details required to initiate SSH connection:

After SSH is enabled for your account, the Terminal menu becomes accessible in cPanel > the Advanced section:


This interface allows direct command-line interactions with your hosting environment:

Managing SSH Keys

After enabling SSH, you can manage your SSH keys through the following options in the “Manage Shell” cPanel menu:

  • Manage SSH Keys: View and manage existing keys.

  • Generate a New Key: Create a new SSH key pair.

  • Import Key: Add an existing SSH key.

These options redirect you to the SSH Access area in cPanel, where you can handle the corresponding key-related tasks:


NOTE: The SSH Access menu can also be located in the “Security” section of cPanel:

Generating a new SSH key

If you do not have an existing SSH key pair, you can create it from the SSH Access menu by clicking on the Generate a New Key button:


You'll be prompted to provide the following details:

  • Key Name: Assign a recognizable name to your key.

  • Key Password: Add a password to the key.

  • Key Type: Choose between RSA and DSA.

  • Key Size: For RSA, a minimum of 2048 bits is recommended for robust security.

After filling in the details, click Generate Key:


Both public and private keys will be created and listed under the corresponding sections of the “SSH Access” cPanel menu.

From there, you can download the generated key as a text file by clicking on the View/Download button:

Importing an SSH key

If you already possess an SSH key pair, you can import it to your cPanel account using the Import Key option from the “SSH Access” menu:


You'll be prompted to provide the following details:

  • Key Name: Name your key (e.g., id_rsa).

  • Private Key: Optional; leave blank if not needed.

  • Passphrase: Enter if your key has one.

  • Public Key: Paste the contents of your .pub file.

Once done, click on the Import button:

Authorizing an SSH key

After generating/importing an SSH key pair, the next step is to authorize the key. To do this, locate the relevant key pair in the “SSH Access” cPanel menu > the “Public Keys” section > click on Manage next to the key:


Click on the Authorize button to verify the SSH key:


Once done, the “Success” message will appear. The key authorization status will also be changed to “authorized” in the “SSH Access” menu: 

How to connect via SSH using keys

After generating/importing an SSH key and authorizing it, it is possible to connect to your hosting account via SSH. 

There are plenty of SSH clients. In our example, we will use the PuTTY SSH client to show you how to access the server via SSH using the SSH key pair generated by cPanel.

  1. Download the generated SSH key from the “SSH Access” menu > click on “View/Download” next to the required key under the “Private Keys” section:


    If you have not generated a new key pair but imported an existing one and authorized it, use the importing file for the server connection in PuTTY.

  2. In the PuTTY folder, run puttygen.exe to open the PuTTY Key Generator application. Once you are in, navigate to the File tab in the top menu > click on the Load private key button:


  3. Look for the SSH key file on your PC and click “Open”.

    NOTE: While searching for the SSH key on your local machine for the import, ensure the “All files (*.*)” filter is used:


  4. To finish the import process, you will be asked to enter the SSH key passphrase (the password used during the SSH key generation).

    Once the password is validated, you will see a corresponding successful message:


    NOTE: If you do not want to assign a password for the key, empty the “Key passphrase” and “Confirm passphrase” fields.

  5. Click on the Save private key button to save the key in the .ppk file format:


  6. Now, open the PuTTY application. From the left-side “Category” column, go to Connection > SSH > Auth > Credentials to authenticate with.

    Click on Browse under the Private key file for authentication field to select the saved .ppk file:


  7. After this, open the “Session” section from the left-side menu. On this page, input the following details:

    • Host Name (or IP address) - the IP address of the server your cPanel account is hosted on. Can be checked in the “Manage SSH Access” cPanel menu. 

    • Port - it should be 21098.

  8. Click “Open”:


  9. Once the console opens, enter the following details:

    • login as - your cPanel account username;

    • Passphrase for key “” - the SSH key password

If everything is correct, the connection to the server will be established:


A valid email is required