How to 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 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. Click on a hosting plan below to learn more about how to access SSH for your specific account.

  • Shared Web Hosting (Including Cloud Sites) ⤵
  • Reseller Web Hosting ⤵
  • Dedicated and VPS Hosting ⤵>

Shared Web Hosting

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

How Do I Use It?

Use port 2222 to connect to the server via SSH and log in with your cPanel username and password using the instructions below ⤵.

Reseller

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.

How Do I Use It?

Use port 2222 to connect to the server via SSH and log in with your cPanel username and password using the instructions below ⤵.

Dedicated and VPS

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

How Do I Use It?

Use port 22 to connect to the server via SSH and log in with username root and your WHM password using the instructions below⤵.

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.

  • Log into WHM.
  • From the left navigation menu, click Account Functions > Create A New Account.
  • Create a new account.
  • Check the Select Options Manually box. You can enable or disable shell access which uses the normal shell option.
  • Under Settings, click the SSH Access box.
  • Click Create at the bottom of the page.

Enable SSH for an Existing cPanel Account

To enable SSH for an existing cPanel account:

  • Log into WHM.
  • From the left navigation menu, click Account Functions > Manage Shell Access.
  • Select the account you wish to modify, then select the type of SSH access to be applied (either normal shell or jailed shell).
  • Once you have made your selection, WHM will automatically save the changes.

How Do I Connect to My Server via SSH?

Below are instructions on how to connect to a server via SSH with various operating systems.

Windows OS

To access SSH:

  • Download WinSCP or PuTTY.
  • Enter your IP address and the appropriate port number.
  • Shared and Reseller accounts - Port 2222
  • Dedicated and VPS - Port 22
  • Log in with your cPanel username and password. Dedicated and VPS customers have the option of logging in with the root WHM username and password.

Linux OS

To connect to the server via SSH, run the following command from a terminal:

ssh -p 2222 cpanelusr@ip.add.re.ss

Replace cpanelusr with your username; and replace ip.add.re.ss with your IP address.

Port 2222 should be used for Shared and Reseller accounts. Port 22 is the default for Dedicated and VPS accounts. Dedicated and VPS customers have the option of logging in with the root WHM username and password.

Mac OS

To connect to the server via SSH, run the following command from a terminal:

ssh -p 2222 cpanelusr@ip.add.re.ss

Replace cpanelusr with your username; and replace ip.add.re.ss with your IP address.

Port 2222 should be used for Shared and Reseller accounts. Port 22 is the default for Dedicated and VPS accounts. Dedicated and VPS customers have the option of logging in with the root WHM username and password.