Your hosting account gives you the ability to connect to an account via SSH, but you must connect using SSH Keys. If you are using a reseller hosting account this guide we will show you how to connect to a individual cPanel account via SSH. Shared server accounts also use the same process to access SSH. First you must generate an SSH key, then convert and download it, and finally connect using an SSH client such as Putty.

How to Generate an SSH Key:

Reseller Accounts only: Before following this guide, make sure you have enabled SSH for the cPanel you are connecting to.

  1. Login to the cPanel that you want to connect to using SSH.
  2. Under Security click SSH/Shell Access.
  3. Click the Manage SSH Keys button, then click in the field labeled Key Password.
  4. Type in a strong password, then click in the field below it and type the password again.
    creating a key
  5. Click the Generate Key button, then, on the next screen click Manage Authorization.
  6. You will see a message stating “The key with the name "id_dsa" (this name may differ based on your settings) is currently not authorized for use to connect to this account. You can change this by clicking here:” Click the Authorize button. You will then see a message stating “The key “id_dsa.pub” has been authorized.”

Convert and Download the SSH Key

  1. Login to the cPanel that you want to connect to using SSH.
  2. Under Security click SSH/Shell Access.
  3. Click the Manage SSH Keys button.
  4. Under Private Keys click View/Download next to the Private key you want to use.
  5. Under Private SSH Key id_dsa conversion to ppk format: enter the password you saved in step 5 of the previous section. Then click the Convert button.
  6. Click the Download Key button, and save this key to your computer, you will need it in the next section.

SSH using Putty:

  1. Open Putty, under Connection click SSH, then Auth.
    authorizing putty
  2. Click Browse under Private key file for authentication, then select the private key you downloaded in the last section, and click Open.
  3. Click Session and under port enter: 2222
  4. For the Host Name, enter your domain name, or shared IP address,then click the Open button to connect.
  5. You will see "Login As". Please enter your cPanel username and then hit Enter.
  6. Then, enter your password and hit enter. For security reasons, PuTTY will not show anything when you type your password, this is normal. You will then be logged into your account via SSH.


Congratulations, now you know how to connect to a Shared server or Reseller cPanel account using SSH!
Did you find this article helpful?

We value your feedback!

Why was this article not helpful? (Check all that apply)
The article is too difficult or too technical to follow.
There is a step or detail missing from the instructions.
The information is incorrect or out-of-date.
It does not resolve the question/problem I have.
How did you find this article?
Please tell us how we can improve this article:
Email Address
Name

new! - Enter your name and email address above and we will post your feedback in the comments on this page!

Like this Article?

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question
n/a Points
2014-06-05 12:44 am

my password got !@#& simbol,in the PuTTY said -bash: !@#& event not found.

Staff
7,372 Points
2014-06-05 8:55 am
Passwords are perfectly fine to have a symbol. We actually encourage it. If you are connecting to a reseller account as described within the article, you will be connecting via a reseller key and not the password itself. Have you successfully generated a key and added it to Putty?
n/a Points
2014-06-05 9:27 am

Ok, about the generator key. when I click on the password generator, pop-up box appears just barely missing a second later. I only managed to print screen to copy the password and could not mark the small box and click on the use password button.

Staff
7,372 Points
2014-06-05 9:44 am
It sounds like you have something going on in your browser that is causing that issue. Try clearing your browser cache or using another browser.
n/a Points
2014-06-27 5:53 pm

How can I connect to my shared hosting shell via SSH on a Mac or Linux machine?

Staff
15,484 Points
2014-06-27 8:40 pm
Hello Ironstone,

There's a way to do it, but you will need to login to your cPanel and then generate a private key that you will be uploading to your Mac.

  1. Login to the cPanel and then go to the SSH/Shell Access icon. Click on it to access section where you can generate the private key.

  2. Click on the button labeled Manage SSH Keys

  3. Click on the button labeled Generate a new key

  4. Type in a password (do NOT use the password generator - it does not work properly), then confirm it. Make sure to write down the password you used. Leave the key type at DSA and key size at 1024.

  5. Click on the Generate Key button.

  6. You should then see a confirmation that the key was generated. Return to the Manage SSH Keys screen

  7. You should see the Public key AND the Private key generated with the name "id_dsa". Click on View/DownloadPRIVATE key. This is the key that you will need to load onto your Mac.

  8. Download the file to your Mac client. To make my instructions a little easier. Simply copy it to your desktop

  9. Before we move to the Mac side of things, we need to complete one more task (which drove me crazy when I was trying to figure this out earlier). You should see that the PUBLIC key has an authorization status of NOT AUTHORIZED. Click on the Manage Authorization link. This will authorize the key for you! NOTE: If you don't authorize this key, it doesn't matter what you do on the Mac side, you won't be able to login, and you'll scratch your head and scream at your screen for several minutes like I did.


  10. Okay... on to your Mac. Login to your TERMINAL program. If you don't know how to do this, go the magnifying glass in the OS toolbar (usually at the top right - this is Spotlight) and type in "terminal". You should see Terminal appear as an application. Select it and it will launch. Before I go on, you do need to be logged into your Mac as the administrator otherwise you will not be able to make these changes.


  11. To make things easy, simply switch to your desktop - which is where the ID_DSA file should be located. The terminal command is: cd desktop


  12. Make sure that the ID_RSA file is already on your desktop. Then type the following into your terminal:



    cp -frp id_dsa ~/.ssh

    This will copy the key into the .ssh folder.

  13. Next run the following command to add the identity to your computer.


    ssh-add -K id_dsa




    You will then need to type in the password you used to generate the key in cPanel.





  14. You should see a confirmation that the identity has been added to your Mac. When this is complete, then you should be able to use the SSH command to login to the server. The cPanel user name will need to be used along with the server name. The command will look like this:

    ssh cpanelusername5@servername.inmotionhosting.com

    (here's an example: ssh user5@ecbiz188.inmotionhosting.com)
  15. If this is the first time you have connected the server, you may see a message stating that it can't identity server. Just click on "YES" to proceed (just make you're connecting to the right server). The password should automatically work and you should see the terminal connect.


Thanks for asking this question. I was actually working on this information before and writing an article for our support center for it, but I was never able to finish it until now. Let us know if you still have any problems. By the way, when I was testing this (deleting the key and starting over several times), I was using a MacBook Pro running the latest version of Mavericks. If you're running some version of OSX, then it should also work.

Regards,
Arnel C.
n/a Points
2014-06-28 6:29 pm

Hi Arnel,

 

Thanks for the detailed explanation. I have followed each and every step exactly but the problem is I am not able to connect to the shell. I tried even with putty as explained in http://www.inmotionhosting.com/support/website/ssh/shared-reseller-ssh

It says connection timeout in putty and in my mac terminal, it also gives connection timeout. What might be the problem? Thanks!

Staff
15,308 Points
2014-06-29 8:03 am
Hello ironstone,

It is possible that the SSH is not yet enabled on your shared server. To my knowledge the rollout was slightly gradual. If you have tried all the instructions, this may be the case. You will want to contact Live Support to have them check your specific server to be sure. Very soon, however, all shared servers will support SSH.

Kindest Regrds,
Scott M
n/a Points
2014-07-02 12:29 am

I got SSH working on my macbook pro! Heres how:

Follow arn's instructions above but on step #14, specify port 2222 and it will work.

ssh cpanelusername5@servername.inmotionhosting.com -p 2222

or 

ssh cpanelusername5@servername.inmotionhosting.com:2222

either will work.

Normally ssh defaults to port 22. Specify port 2222 and everything will work!

 

To get the ssh username and servername, login to your AMP:

https://secure1.inmotionhosting.com/amp/

and click on Account Technical Details.

Enjoy!

n/a Points
2014-07-02 9:40 pm

Thanks Nick! It worked! I have another issue right now other than ssh. I realized that python virtualenv is not installed. I expected it was installed already. How can I demand it installed? Thanks in advance.

Staff
9,521 Points
2014-07-03 4:59 am
Hello ironstone,

You can install the Python virtualenv on either a VPS or dedicated server yourself with root access.

Or you can submit a ticket to see if it's one of our installable softwares available.

I don't believe their are any current plans of having Python virtualenv available on our shared or reseller servers. But you can check directly with our system administration team by submitting a ticket to find out.

- Jacob

Post a Comment

Name:
Email Address:
Phone Number:
Comment:
Submit

Please note: Your name and comment will be displayed, but we will not show your email address.

11 Questions & Comments

Post a comment

Back to first comment | top

Need more Help?

Search

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!