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 access a remote computer that runs an SSH server. This is used to carry out commands, file transfers, tunneling of applications, and even terminal access. HostGator offers SSH (secure shell) access to all Linux hosting plans except Optimized WordPress.
We offer locked SSH, which is limited to your account only. Please click the link below to jump into the section to:
By default, we have locked SSH enabled on the primary domain for the account.
VPS and Dedicated Hosting
VPS and Dedicated hosting 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.
How to enable SSH for a new cPanel account
If you have multiple cPanels that need SSH, you can activate them within root WHM.
- Log in to WHM.
- In the left category list, click the Account Functions and select Create a New Account.
Alternatively, you can use the Search Tools and Account field to search for Create a New Account.
To create a new cPanel account, please check out this article How Do I Create a cPanel Account?.
- Put a check on the Select Options Manually box in the Package section. This is where you can enable or disable shell access, which uses the normal shell option.
- Under the Settings section, put a checkmark on Shell Access.
- Click Create at the bottom of the page.
How to enable SSH for an existing cPanel account
To enable SSH for an existing cPanel account:
- Log in to WHM.
- In the left category list, click the Account Functions and select Manage Shell Access.
Alternatively, you can use the Search Tools and Account field to search for Manage Shell Access.
- Locate the account you wish to modify.
- Select the type of SSH access to be applied on the account — Normal Shell, Jailed Shell, or Disabled Shell.
- 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
- Log in to your Customer Portal.
- Click Hosting from the left-hand menu.
- Locate the hosting package where you wish to enable the SSH, then click its Manage link.
- On the next page, select the Settings tab.
- Under the Settings tab, click the Enable shell access button.
- You will see a checkmark notifying you that it has been enabled.
- You may also want to take note of your cPanel username and the IP address from the same page as you will use them on Step 2 ⤵.
Step 2 - Set up Terminal
- Open your preferred terminal.
- In your terminal, type in:
ssh cpanelusername@IPaddress -p2222Notes:
- For Shared and Reseller hosting, use port 2222.
- For VPS and Dedicated hosting, use port 22 instead. Dedicated and VPS customers can log 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 firstname.lastname@example.org -p2222
- Hit Enter.
- A confirmation prompt to proceed will appear. Type in yes and hit Enter.
- 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, check out this helpful article, Shell Command.