1. Knowledge Base
  2. >
  3. Results
  4. >
  5. How Do I Get and Use SSH Access?

How Do I Get and Use SSH Access?

 

Secure shell (SSH) provides secure access to the shell environment on your HostGator account. SSH enables you to have access to a remote computer that runs an SSH server. This is being used to carry out commands, file transfers, tunnelling of applications, and even terminal access. HostGator offers SSH (secure shell) access to all Linux hosting plans except Optimized WordPress.

Shared Accounts

We offer locked SSH, which is limited to your account only.


Reseller Accounts

By default, we have locked SSH enabled on the primary domain for the account.

If you would like to activate SSH on a sub-account (separate cPanel), please contact us via phone or Live Chat with the primary domain of the cPanel that needs to be activated.

Dedicated and VPS Accounts

Dedicated Server and VPS customers automatically have root SSH access, allowing users to change anything on their server.

If you enable shell access for individual cPanels, the SSH username and password would be the same as the cPanel username and password for those accounts.

Enable SSH for a New cPanel Account

If you have multiple cPanels which need SSH, you can activate them all within root WHM.

  1. Log into WHM.
  2. From the left navigation menu, type in new account in the Search box.

    WHM - Create New Account

  3. Select Create a New Account. To create a new cPanel account, please check out this article.
  4. In the Package section, put a check on the Select Options Manually box. This where you can enable or disable shell access, which uses the normal shell option.

    WHM - Select Options Manually

  5. Under the Settings section, click the SSH Access box.

    WHM - Settings - SSH Access

  6. Click Create at the bottom of the page.

Enable SSH for an Existing cPanel Account

To enable SSH for an existing cPanel account:

  1. Log into WHM.
  2. From the left navigation menu, type in manage shell access in the Search box.
  3. Select Manage Shell Access.
  4. Locate the account you wish to modify.
  5. Select the type of SSH access to be applied on the account — Normal Shell, Jailed Shell, or Disabled Shell.

    WHM - Type of SSH Access

  6. Once you have made your selection, WHM will automatically save the changes.

How Do I Connect to My Server via SSH?

Here is a video that will walk you through connecting to your server via SSH with different operating systems.


We have outlined the steps in the video guide above.

Step 1 - Enable Shell Access

  1. Log into your Customer Portal.
  2. In the Dashboard, under your shared hosting package you wish to enable the SSH, click Manage Package.

    Customer Portal - Manage Package

  3. Click the Settings tab.

    Customer Portal - Settings tab

  4. You may want to take note of your cPanel username and the IP address from that page.
  5. Under the Settings section, click the Enable shell access button.

    Customer Portal - Enable Shell Access

  6. You will see a green checkmark notifying you that it has been enabled.

    Successful Prompt

Step 2 - Set Up Terminal

  1. Open your preferred terminal.
  2. In your terminal, type in:
    ssh cpanelusername@IPaddress -p2222
    Notes:
    • Port 2222 is used for Shared and Reseller accounts.
    • To connect to your VPS and Dedicated servers, use port 22 instead.  Dedicated and VPS customers have the option of logging in with the root WHM username and password.
    • Please replace cpanelusername and IPaddress with your actual cPanel username and IP address you copied from your Customer Portal with the @ symbol in between.
      Example: ssh example@123.456.789.000 -p2222
  3. Hit Enter.
  4. A confirmation prompt to proceed will appear. Type in yes and hit Enter.
  5. You will be asked to provide your cPanel password. Type in your cPanel password and hit Enter.

You are now connected to your SSH. To know more about the commonly used shell commands, you can check out this helpful article, Shell Command.