Home > Help Center > Shared Hosting > Control Panel > SSH Access in cPanel

SSH Access in cPanel

This interface provides information about connecting to another web server using the SSH (secure shell) network protocol.

The SSH network protocol allows you to connect to another web server over the Internet via a command line (CLI) interface. You can use this network protocol to remotely manage your server, configure CGI scripts, and perform other tasks.

Many advanced operating systems, such as MacOS and Linux, include SSH. If you use Microsoft Windows® to connect to your server, you must use an SSH client, such as PuTTY, to log on to your server.

Many Unix-based operating systems include standardized commands. For a list of standardized Unix-based commands (POSIX), read the documentation on the One-Serve (http://www.one-serve.com/tools/unix_commands.php) website.

Note: Not all hosting providers allow shell access.

Connect to your server via SSH

The following sections describe how to connect to your server through different SSH clients.

PuTTY

To use PuTTY to connect to your server using SSH, follow these steps:

  • Download and install PuTTY client.
  • From Windows Start menu open the client.
  • In the Session interface, enter the name of the host or IP address of the server in the Host Name (or IP address) text box.
  • Enter the port number in the Port text box.
  • Make sure you have selected the SSH protocol.
  • Click Open.
  • Enter root as the login name.
  • Enter the root password.

PuTTY and private key

To access a server via SSH with PuTTY and a public key, follow these steps:

  • From Windows Start menu open the client.
  • Navigate to the PuTTY Key Generator interface.
  • In the Actions header, click Generate. PuTTY generates the key and displays the result under the Key menu.
  • Copy the public key and paste it into the .ssh/authorized_keys file.
  • Enter the passphrase in the text fields Key passphrase and Confirm passphrase.
  • Click Save private key and save the key as a .ppk file.

Important: You must keep the PuTTY keys as .ppk files.

  • In the Saved Sessions session interface, select your preferred authorization session and click Load.
  • Navigate to the Auth interface in the SSH category.
  • Click Browse, select the private key file you want to upload, and click Open.
  • Navigate to the Manage SSH Keys on cPanel (Home > Security > SSH Access > Manage SSH Keys) and import the keys to the server.

MacOS or Linux

To access your MacOS or Linux server through SSH, follow these steps:

Open a terminal session and execute the following command:

ssh -p port user@IP

In the upper command:

  • port is the port number SSH is running on,
  • user is your username,
  • IP is your IP address.

SSH Keys Management

This section of the SSH Access interface in cPanel allows you to create, import, manage, and remove SSH keys. The system will use these keys when you confirm that a particular computer has the right to access the information on your website through SSH.

Generate new key

Use this part of the interface to create new pairs of SSH keys that include a public key and a private key.

To generate a new SSH key pair, follow these steps.

In the Security section, click the SSH Access link or type ssh in the search box:

cpanel ssh access

cpanel ssh access

  • Click Manage SSH Keys.
  • Click Generate a New Key.
  • To use a custom key name, enter the key name in the Key Name text box (id_rsa is the default value).
  • If you use a custom key name, you must manually set the SSH key when you log on to the server.
  • Enter and confirm the new password in the corresponding text fields.

cpanel ssh access

cpanel ssh access

This step is optional if your hosting provider sets SSH Keys setting to 0 (zero) in WHM > Home > Security Center > Password Strength Configuration.

The system evaluates the password you enter on a 100-point scale. 0 shows a weak password and 100 shows a very secure password. Some web hosts require minimal password strength. Green password Strength meter indicates that the password is equal to or greater than the required password strength. Click Password Generator to generate a strong password.

Select the desired key type

The DSA keys provide faster time to generate and time to sign up.

RSA keys provide faster confirmation times.

Select the key size you want - 2048 is the default value.

Larger key sizes provide greater security, but result in larger file sizes and slower authentication times.

Click Generate Key. The interface will show the saved key location.

Important: To operate the new SSH switch, you must authorize the SSH switch. For more information, read the Manage Your Keys section.

Import key

To import an existing SSH key, follow these steps:

Click Manage SSH Keys > Import Key:

cpanel ssh access

To use a custom key name, enter the key name in the text box Choose a name for this key (the default is id_dsa).

If you use a custom key name, you must manually set the SSH key when you log on to the server.

Put the public and private keys in the corresponding text boxes.

Click Import:

cpanel ssh access

Managing Your Keys

Tables with Public Keys and Private Keys show the following information about existing keys:

cpanel ssh access

Name - The name of the key. Public and private keys use the same name. Authorization Status - whether you have authorized the key. Before you try to use them, you must authorize the new keys. This column is only displayed in the public keys table.

You can do the following actions:

  • Delete Key - click to delete the key, then click Yes to confirm that you want to delete the key.
  • View/Download - click to view or download the key. To download the key, save the contents of the Public SSH Key text box on your computer.
  • Manage - click to manage the key permission. A new interface will appear. Click Authorize to authorize the key, or Deauthorize to revoke the key authorization.

You can do this only for public keys. After you disable the key authorization (Deauthorize), the users of this key can not access the server with the corresponding private key.

Still not finding what you're looking for?

Contact our support team with any additional questions or concerns.

Contact support