Configuring SSH (Secure Shell) on HostGator

One of the great things about  HostGator is that it offers SSH (Secure Shell) on its shared hosting plans.

For most users, SSH may seem unnecessary, but having access to it is extremely useful. If you are concerned about security, for example, SSH can be used along with FTP to enable secure file transfers via SFTP (secure file transfer protocol) or SCP (secure copy protocol). It also prevents unauthorized access to your server and files because all login credentials are encrypted. (Logging in also requires a person to have a private key.) But probably the most common use for SSH is the command-line interface which enables you to easily connect to your server and send commands.

Alright, so how do you set it up on HostGator?

Setting up SSH on HostGator

1. To get started, you need to request for SSH to be enabled on your account.

In the past, HostGator required a copy of a valid photoID in order to enable SSH. However, this no longer seems to be the case. And currently, there are three methods to get it setup:

  • use the handy SSH request form
  • request it by emailing HostGator support
  • open a HostGator live chat window and have an operator set it up

2. Now you will need to configure it for access.

Log into your HostGator cPanel and navigate to SSH / Shell Access under the Security heading. And just follow the instructions to ‘Manage’, ‘Create’, and ‘Authorize’ SSH keys.

Connecting to Your Server via SSH

HostGator provides two Java-based utilities that you can use to connect to your server. But for maximum flexibility, standalone SSH clients are more useful. For Windows users, WinSCP and PuTTY are very popular. And for Mac users, Cyberduck is a highly recommended favorite.

Troubleshooting Common SSH Connection Problems

  1. Wrong Port Number. The standard port for SSH connections is 22. However, HostGator uses port number 2222.
  2. Key Not Authorized. Be sure to authorize your key within HostGator’s cPanel SSH options.
  3. Private Key Missing. Make sure that you have downloaded your private key. It is needed to help authorize your SSH session. And if you are using PuTTY, be sure to download the key in the PuTTY’s ppk format.
  4. Wrong Passphrase. When you created your key, you were required to enter a password or passphrase. Be sure to remember this as it is used for authentication along with the key.
Tags: , , , ,

11 Responses to “Configuring SSH (Secure Shell) on HostGator”

  • On March 24th, 2009 at 5:29 pm, Dennis Edell wrote:

    Very nice 1 2 3, thanks. :)
    Dennis Edell’s last blog post..3 Secrets to Writing for the Search Engines

  • On March 25th, 2009 at 6:45 am, Xyem wrote:

    I would like to use this but I do not have the icon in my cPanel. Asking HostGator via the ticket system left me with this response ( so far ):

    Hello,

    We do not have the SSH access from with cpanel enabled. You will have to use Putty. As for key authentication, this is not allowed either. At this time we only allow password authentication.

    If you need anything else just let us know.

    =-=-=-=-=-=-=-=-=-=

    NathonH
    Night Shift Support Manager
    Level 2 Systems Administrator

  • On March 25th, 2009 at 7:19 am, Xyem wrote:

    Just got another response which confirms that the SSH icon is disabled but you can still use key authentication by creating a ~/.ssh/authorized_keys2 file with the correct information. The reply is below:

    The “SSH/Shell Access” section of cpanel is disabled, however, this should not prevent you from using shared keys. You would need to login through SSH and set this up manually, however. Directions on how to accomplish this can be found here: http://the.earth.li/~sgtatham/putty/0.53b/htmldoc/Chapter8.html

  • On March 25th, 2009 at 9:12 am, Velvet Blues wrote:

    @Xyem: Well, that’s strange… Perhaps the server that you are on isn’t configured for this… (Or maybe you got a confused HG admin, because you should be able to generate the keys on your server and download them.)

    Either way, PuTTY isn’t too hard to set up. And it has a very easy-to-use key generator.

  • On March 25th, 2009 at 9:59 am, Xyem wrote:

    I got this up and running without a problem once I tried the manual way. I’m on the ‘Baby Croc’ shared hosting plan if that makes any difference. I used a key I had already generated.

    Perhaps a follow-up with the ‘manual’ way might be appropriate, in case others find themselves like-wise confused?

    Cheers

  • On March 28th, 2009 at 12:59 am, bloggingnews01 wrote:

    Yes, while it is in a shared environment SSH is the only way to go. I can download files so much faster with TAR, chmod files, insert mysql commands, etc alot faster through the prompt rather than through the control panel….

    I wouldn’t say that SSH is inherently dangerous in a web hosting environment if it is setup properly.

    But I will give hostgator a try…. If it doesn’t do what I would like I am just going to host my services somewhere else…… The reason that I am trying out hostgator is the fact that I have heard positive comments on the uptime… The last hosting company I was with (dzones.com) had alot of downtime, even though they stated that they had a 99.9% uptime, which I found hard to believe….

  • On March 28th, 2009 at 5:52 am, Hostgator coupon code wrote:

    Thanks for the info, it is nice to know the common problems that you can encounter.

    @Xyem I also like the manual approach. Basically they give all the info you need in a normal environment.

  • On March 31st, 2009 at 7:19 am, Ajith Edassery wrote:

    Hopefully I will move to Hostgator once my current payment period with Host Monster is over. HM is giving a lot of CPU exceeded errors even without much traffic. I am getting more and more positive reviews about HG.

    When I move, I will remember your post :P
    Ajith Edassery’s last blog post..Update on 2009 Objectives and more

  • On March 31st, 2009 at 11:44 pm, Velvet Blues wrote:

    @Ajith: Yes, HostGator is great. I am always recommending it to others. They have a great combination of lots of features and a low affordable price. I’d say that they’re the best in shared hosting.

  • On September 10th, 2009 at 1:38 pm, Udegbunam Chukwudi wrote:

    @Ajith Edassery: Here I was recommending HostMonster to my readers so as to make a few affiliate sales. Thank God I finally came around to only recommending stuff I’ve used to my readers. Hostgator’s a bit pricey but for the services you get, they are definitely worth it.
    Udegbunam Chukwudi´s last blog ..How To Increase Your Adsense CPC Earnings My ComLuv Profile

  • On November 11th, 2009 at 12:20 am, connor wrote:

    Thanks for posting the port number, I was having trouble connecting and i was suspecting that they had some other number than the default one.
    connor´s last blog ..Change Windows 7 Logon Background My ComLuv Profile

Trackbacks

Trackback URL for this entry:
http://www.velvetblues.com/web-development-blog/configuring-ssh-secure-shell-on-hostgator/trackback/

Leave a Reply

CommentLuv Enabled

Want us to work on your project?

Contact us today for a quote. Click here to submit details regarding your project.

If you are making a general inquiry, send an email to info@velvetblues.com