How to SSH Into Your Shared/Reseller Server

How to SSH into your Shared/Reseller Server

If you are using a shared hosting or reseller hosting account, this guide shows you how to connect to an individual cPanel account via SSH using a client such as PuTTY.

Video: How to Connect to your Server with SSH

How to Generate an SSH Key

Note for Reseller Customers: Before following this guide, make sure you have enabled SSH for the cPanel user that you are using to SSH with.

  1. Login to the cPanel that you want to connect to using SSH.
  2. Under Security click SSH Access.
  3. Click Manage SSH Keys.
  4. Then click Generate a New Key.
  5. Type in a strong password, then click in the field below it and type the password again.
    creating a key
  6. Click Generate Key, then you will see a Key Generation Complete! message.

How to Authorize an SSH Key

Once you have generated the SSH Key, it needs to be Authorized.

  1. Login to the cPanel that you want to connect to using SSH.
  2. Under Security click SSH Access.
  3. Click Manage SSH Keys.
  4. On the next screen, locate the key you just created under the Public Keys section. Click Manage (under the Actions column) next to your new key.
  5. You will see a message stating:”The key with the name “id_dsa” is currently “not authorized” for use when connecting to this account.Click Authorize. 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 Access.
  3. Click Manage SSH Keys.
  4. Under Private Keys click View/Download next to the Private key you want to use.
  5. On the next screen, scroll down to the Convert the “id_dsa” key to PPK format: section. Enter the passphrase used to generate the SSH key in the Enter the passphrase to unlock the “id_dsa” key for conversion: field.
  6. Click Download Key.

Note: If you have converted the key to PPK format using cPanel, make sure to review the PuTTy-User-Key-File version that it has been converted to. You will see it in the first line when you convert the key (as per the screenshot below). Some FTP clients are unable to use the PuTTy_user-Key-File-3 version. The version that is converted will vary based on the cPanel version that you are using. Build 94 and older will use the older formats (version 1 and 2). FileZilla is noted for not supporting version 3 of the PPK file. You can use another FTP client to avoid this issue.

View or Download SSH Key

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. 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 Open to connect. If you see a PuTTY Security Alert, click Yes.
    Host key is not cached message
  5. You will see “Login As“. Enter your cPanel username and then hit Enter.
  6. Enter the password for your key file 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!

For Basic Terminal Emulators

If you are not using PuTTY, and you wish to SSH into your server from any terminal editor, all you need to do is download your keys (as seen above) and use the private key in your terminal emulator, as follows:

ssh -p 2222 -i path/to/private_key [email protected]

Make sure to substitute the proper path to your private key and use your proper cPanel username and shared IP address.

If you don’t want to type all of those options into your terminal every time you connect, you can use a local SSH configuration file to simplify it. You just need to create a file called “config” in the local .ssh directory (.ssh/config). Once you have done that, you can name the connection and associate values with it, as in the example below:

Host imh
        User userna5
	Hostname example.com
	Port 2222
	IdentityFile ~/.ssh/id_rsa

If you were to use the example above, replacing the example values with your own real values, you would only need to type the following at the terminal prompt:

ssh imh

And you will be instantly connected to your server over SSH.

Provide hosting services to your clients using your own brand. Check out InMotion’s all new Reseller Hosting plans today!
IC
InMotion Hosting Contributor Content Writer II

InMotion Hosting contributors are highly knowledgeable individuals who create relevant content on new trends and troubleshooting techniques to help you achieve your online goals!

More Articles by InMotion Hosting

130 thoughts on “How to SSH Into Your Shared/Reseller Server

  1. I’m trying to use macOS terminal and it gives me this error:

    ssh pcsupport.com.mx
    Load key “key.ppk”: invalid format
    user@host: Permission denied (publickey).

    1. Hello, it appears that there may be an issue with the credentials. Please reach out to our Technical Support team directly at https://inmotionhosting.com to troubleshoot this further.

  2. i’ve generated a id_rsa-test key. got to last step, downloaded to pc, open key but mine is not a “PuTTY”. r the instructions old? i see no option to generate a putty key, mine is —–BEGIN RSA PRIVATE KEY—–
    Proc-Type: 4,ENCRYPTED
    DEK-Info: AES-128-CBC,D64A296AE561F0F3CECD17E7C7DE7CF9. is there any updated GUI to use this rsa private key or do i have now follow your instructions “For Basic Terminal Emulators…”? in your cmd i don’t see the rsa key name (in case we created one other than the default rsa key name). ssh -p 2222 -i path/to/private_key [email protected]
    thank you!

  3. In SSH Using PuTTY section, my port is 22, can you update this article? Thanks for InMotion Hosting’s documents.

    1. Hello Azmat,

      Access to SSH may depend on the account type or the server that you are on. If you’re on a shared server, please contact our live technical support team and they can review the issue to see if there is a problem. Shell access from a reseller account may not have enabled SSH for the account. If you are a client of a reseller, then you will need to speak with the owner/administrator of the account to have the option enabled. If you are the owner of the account then you can see how to enable SSH in WHM.

  4. Hello,

    I have the inmotion Launch Plan (I believe it is the same as Shared/Reseller Server), and want to have a script that connects automatically to my inmotion account via SSH and transfer a file. The problem is that I need to generate SSH keys without a password, but the password seems mandatory. Is there another option ? Thank you !

  5. voilà! – I got connected 

    Follow all the instructions with just this change

    check pre-authentication and

    uncheck Bypass authentication

  6. hi there,
    We are running a Magento ecomm site on shared hosting and have SSH access. For some preformance and other tasks developer wants “ssh access root or sudo access”.

    How can I get this level of access?

    Thanks you

    1. Unfortunately, root access is unavailable on shared accounts. If for any reason you want to do root functions, you’ll need to upgrade to a VPS plan via AMP.

  7. Every time I start conntction error occures:

    connection timed out.

    I even tried using shared IP. But it is not working.

     

     

    1. If you are unable to connect with SSH, using the instructions in this article, then you should contact our live technical support team. They will be able to verify if there is a server issue, or if this an issue with how you’re attempting to connect to SSH.

  8. after useing  putty to connect toserveri get the following error

    server sent disconnect massage type2 (protocol error) bad service request ss-connection

    please advice

    1. That error indicates that the password you assigned to the key and the password you are entering does not match. I recommend re-trying and when you are entering a password in cPanel for the key, make sure that the field is not being auto-filled by a password manager/extension. If the issue persists, try using another password, it’s possible the characters you are using are not valid for a password. I hope this helps!

  9. when I run this comand “ssh-add -K id_rsa

     

    I get this: “Permissions 0644 for ‘id_rsa.ppk’ are too open.
    It is required that your private key files are NOT accessible by others.
    This private key will be ignored.

    Please help

    1. That means your permissions for your key file are set to 644, however, private keys should only be readable by your user for security purposes, you need to set the permissions to 400, 600 will work on most systems as well but 400 is what it should be. You can do this by running “chmod 400 path/to/your/private/key”

  10. Thanks for this, and sorry for the late reply.  I kept scrolling to the bottom to look for it!

    I was able to connect via port 2222, and that’s good.  Not able to add the Let’s Encrypt cert, but got very close, so I’ll keep trying.  Thanks again,  Scott

  11. Hello everybody, I’m trying to install Let’s Encrypt which requires SSL.  I’ve used the helpful guide for the installing SSL on the mac terminal, and Terminal does recognize the SSH key.  But when I enter in the final command: ‘ssh k***5@b***9.inmotionhosting.com’, Terminal hangs.  No error message, nothing.  

    I’ve tried it with deliberate misspelling, which does return an error ‘Could not resolve hostname *****.inmotionhosing.com: nodename nor servname provided, or not known‘, but I’m a bit stuck at this point.  

    I can’t seem to add IP addresses (only block them), but I’ve switched to a US VPN to test this as well, and also seems to hang.  Any thoughts are welcome.  

    1. Hello,

      Hanging generally means its waiting for the connection but it is timing out, This will happen if you are SSHing to the wrong port, On shared and reseller servers the SSH port is 2222. Generally to use that you would run ‘ssh -p 2222 [email protected]’.

      Best Regards,
      Kyle M

  12. For anyone using linux to connect via SSH, this is what I did to connect successfully. It’s mostly the same as MacOS.

    generate key using cpanel, download key
        security | ssh access | Manage SSH Keys | Generate a New Key
        Manage SSH Keys | Public Keys | <key just created> | Manage | Authorize
        Manage SSH Keys | Private Keys | <key just created> | View/Download | Download Key | <Save as ".ssh/inmotion">
    change permissions of just-downloaded private key
        chmod 600 .ssh/inmotion
    add id to own "ssh keychain", use same password used to generate the key in cpanel
        ssh-add .ssh/inmotion.id_rsa
    login (hit "yes" first time to add fingerprint)
        ssh [email protected] -p 2222

     

    Hope that helps.

  13. I’m using CodeGuard to monitor and backup my files. I created a encrypted public key which works great with FileZilla – however CodeGuard only uses unencrypted RSA and DSA keys. How do I created a unencrypted public key?? cannot find info on InMotion.

    1. Hello Ted,

      Sorry about the issue with the key. We do not support the unencrypted public keys to connect to the server.

      If you have any further questions, please let us know.

      Kindest regards,
      Arnel C.

  14. Just a quick comment, as I also got the “no supported authntication method available” error.  If you are a reseller and follow the instructions to the letter, you probably won’t get in via SSH. That’s because the instructions say to enter your cpanel username into putty.  If you follow the link to verify what that is, you will get to your account technical details page, and it’ll give you the main account cpanel username. BUT, if you are trying to connect to another account — say, some other site in your WHM — you have to use THAT cpanel username, not the main one for your entire Inmotion account. So… was a bit confusing. Although, luckily, I guessed that this was the issue and got in. Just mentioning this in case anyone else has this issue… could be an easy fix for you.

  15. I have followed all the instrution. But during final stage, under connections, Auth, when i try to open the generated file, nothing opens. Why?

    Please help

    1. Sorry to hear about the trouble you are experiencing. I recommend contacting live support, so they can replicate within your account, and check your server for issues.

      Thank you,
      John-Paul

  16. I am running Mac OSX.  Command [ssh-add -K id_dsa] resulted in the response “No such file or directory”.  I am having a very hard time getting to the login portion with terminal.  Assistance would be very much appreciated.

  17. Your isntrauctions have  mistake. Putty will not open (on Win) unless you FIRST type in the domain and port. Your instructions should not click the “open” button till last, otherwise it just beeps at you.

    1. The section you are referring to when clicking ‘Open’ is on a sub-menu / window, and the ‘Open’ button you are referring to isn’t referenced until after the fields you mentioned have already been filled..

  18. I’ve spent the last couple of hours trying to get SSH access to my new hosting account from my MAC environment. It was only good fortune that I tripped over this thread and was able to piece together the correct information.

    This whole thread needs to be made a support article on it’s own — with all the corrections thrown in.

    ie. now it defaults to RSA not DSA – the article should say why I’d want either.

    You need to chmod 600 id_rsa or chmod 600 id_dsa before using the ssh-add command.

    chmod 400 will work too.

    and the port number is 2222 not 22

    The next person in will save at least 90 minutes.

     

  19. Hi,

    I managed to make SCP/SSH work according to your description above. Is it possible to somehow deactivate normal unencrypted ftp? Wouldn’t this increase secutity or am I wrong?

    Best regards,Niklas

    1. Hello Niklas,

      If you are on a VPS or dedicated server you can force the use of encrypted FTP. And yes, this would be another way to improve security on your server.

      If you have any further questions, please let us know.

      Kindest regards,
      Arnel C.

  20. Greetings.

    I did everything all the tutorial explain.

    I generaded the key in the cpanel, then with puttygen it conversed the key after that I use putty.exe with namehosting, ip hosting, ports 22 and 2222. But finally all times the same message from putty: «Network error: Connection timed out»

    Please, I want to install NodeJs in my server.

    1. You may want to check with Live Support to see if they can see any issues on the server side when you try to log in.

      As for node.js, you will not be able to install that on a shared server. You will need a VPS or Dedicated server for that.

  21. I followed everything down to the final step, but when I enter my username into PuTTY and press enter, I get a popup saying:
    “Disconnected: No supported authentication methods available (server sent:publickey)”

    And in the PuTTY panel, a message appears under my username saying: “Server refused our key”

    Any help would be appreciated. Thanks!

    1. I advise going through section 2, around step 10. If one part of this process is missed then it can cause errors similar to the one you are seeing. You can also monitor system logs, or, if in a shared server with us, you can contact our Live Support team to check those logs for you.

  22. I followed all the steps. In PuTTYgen, I go to load the key, select all files, select the file I downloaded from cpanel and click load and I get an error:

    Couldn’t load private key (not a private key)

    Please advise.

    1. Hello Graham,

      I ran through the steps without issue. Try doing them again from start and see if that helps. Be sure that you downloaded the private key and not the public key.

    1. In Step 1 of the “Download and Convert the SSH Key”, there is a link to the downloads page for puttygen. click on the word “puttygen” and it should take you to it.

  23. I’ve follwed the steps in this tutorial and I get “PuTTY Fatal Error – Network error: Connection timed out” when I click open in SSH using PuTTY step #4.

  24. I was looking up my account details and now it says “fatal error – connection timed out”. I restarted everything and that still happens. What should I do?

  25. Just FYI I spent a bunch of time hitting a wall on step 13 Arn’s post above detailing  how to connect to my shared hosting shell via SSH on a Mac

    This post helped me create a .pub file that allowed me to get past the @UNPROTECTED PRIVATE KEY FILE@ error I was facing using a Mac 10.8.5
    https://apple.stackexchange.com/a/26252

    Which finally gave me the magic words I was looking for:
    Passphrase updated in keychain: id_dsa
    Identity added: id_dsa (id_dsa)

    Now I’m hitting a wall when trying to connect to the host using ssh [email protected] -p 2222

    Keeps giving errors (with and without the [-p 2222] part)
    ssh: connect to host m*****k.pipelinecourse.com port 2222: Connection refused

    and 

    ssh: connect to host m*****k.pipelinecourse.com port 22: Operation timed out

    I have tried to turn off the firewall and open ports, but I can’t see what the problem would be. I turned on remote login in Sharing in the Control Panel. 

    Ah. Ok, so I was having conflicts with previous keys that were being generated, so going into 

    1. Run /Applications/Utilities/Keychain Access.app and repair keychain.

    and searching for id_dsa in category all items helped me to find the application SSH: /Users/k*******7/.ssh/id_dsa application.

    So I clicked on it, just as any inquisitive Asian would do and changed access control to ‘Allow all applications to access this item’ <- not sure if that’s what did it or not but now I’m able to see:

    Are you sure you want to continue connecting (yes/no)? yes

    Warning: Permanently added '[m****.pipelinecourse.com]:2222,[25.255.255.200]:2222' (RSA) to the list of known hosts.
    Attempting to create directory /home/m*****k/perl5
    m*****k@m******k.pipelinecourse.com [~]#

    Which is apparently showing me connected to the server meow. Since a pwd shows me in /home/m*******k

    ls confirms this is the truth. 

     

    I’m pretty new with this so please feel free to help me and correct me or clarify my details.

  26. I’m at step 7 under Download and Covert SSH Key. I have Linux not Putty.  I’ve downloaded my key but I don’t know how to proceed from here.

    1. I followed this guide and everything worked fin up until loggin into my VPS.

      I can not log into it using port 2222.
      I can only log in using port 22.

      Will this cause me problems? I’m having a permission denied when trying to change mysql settings and not sure if that is related

    2. Hello Dyllon,

      puttygen is uses to convert the key. You can use puttygen on Linux to do that as well.

      Kindest Regards,
      Scott M

  27. Thank you so much I got a little further but it is now saying server refused our key. I have tried erasing everything and starting back over still receiving the same message after long in

    1. Hello Malikas,

      It sounds like you were able to do at least part of what was suggested by TJ in the last reply. Can you provide us a little more information on how you have created the key? If you can provide more information on the account, we can also double-check it ourselves.

      Apologies that we can’t provide a direct answer at this point. If you have any further questions, please let us know.

      Kindest regards,
      Arnel C.

  28. No I didn’t. Thank you. Would you happen to know how I would do that in cpanel or do I need to do it in my internet browser

  29. Hello,

    I am having trouble with the last step. I uploaded the private key and went to session added the host name (ip address) and changed the port to 2222, however, I recieved an error message (network error: connection refused

  30. Had this error too, until I realized I missed the last sentences of ‘How to Generate an SSH Key’ step 7. Make sure to authorize your public key!

    1. Hi!

      I have asked this question elsewhere, but I wasn’t logged in, so I don’t know if it worked.

      I was able to setup SSH using the instructions (and I used Terminal in OSX).

      Is there a way to create a new email account using SSH?
      How about creating a new email forward using SSH?

      Thanks!

    2. Hello Garrote,

      on a shared or reseller server, that will need to be done via the cPanel.

      Kindest Regards,
      Scott M

    3. Still unable to run Putty or Win Secure? Try this:

      Follow these steps to step 6:
      https://www.inmotionhosting.com/support/website/ssh/shared-reseller-ssh

      Now. With Putty and Win Secure already installed on your windows machine:

      1. Go to the folder where your .ppk was downloaded to.

      2. Double click it… the .ppk will find putty itself and then ask for your password

      3. Enter password, press enter

      4. Now open your Putty

      5. Insert your IP address and select port 2222

      6. Click save

      7. Now ‘open’ Putty and all you will need to supply is your server username. Putty will find and authorise the key.

      If you setup Putty first, all you need to do with Win Secure is:

      1. Open it
      2. Add your username
      3. DO NOT ADD A PASSWORD
      4. Add IP
      5. Add 2222 for port
      6. Save it
      7. Click ‘login’ and Win Secure will find your .ppk file itself

      all done

  31. In the instructions for Mac, did you mean id_rsa instead of id_dsa? We downloaded the id_rsa file to the desktop. If we try to copy id_dsa, there is no such file…

    I’m proceeding with that change, I’ll let you know how it goes…

    1. In the instructions for Mac, did you mean id_rsa instead of id_dsa? We downloaded the id_rsa file to the desktop. If we try to copy id_dsa, there is no such file…

      I’m proceeding with that change, I’ll let you know how it goes…

      Hello,

      The actual key name can be whatever, so the instructions were based on the key that I had by default on my particular Mac at the time. You should be able to run terminal on your mac and get a file list to see the name of the file that you’re using if you don’t know what it is. In the process of looking at this question, I just looked at my files and I have an “id2_dsa” file, since I’ve created several keys in the past.

      I hope this helps to answer your question, please let us know if you require any further assistance.

      Regards,
      Arnel C.

  32. Thank you reply.But please guide me that I need to add the same password that I used during SSH Key Generated or should I use the password which is already used under the passphrase under private key ?

    1. Hello Anshul Vyas,

      That is correct. The password you’re entering in step 9 is the same password as the one you used when generating the SSH key.

      Regards,
      Arnel C.

    2. I see several conflicting posts here regarding the
      @ WARNING: UNPROTECTED PRIVATE KEY FILE! @
      error.
      I just tried several different chmod settings and the one that actually worked is 400. FYI.

    3. so by usiing putty via ssh once i log in using the key method would i be online surfing the web via my hosting account? how do i set up my browser to work that way? is this how people connect to the net remotely a get a different ip address ?

    4. Hello XtremeJim,

      This method allows you a secure connection to the server so you can work using the command line. It is not for web surfing. That would be what is called a proxy server, or VPN. Those services can be purchased on a monthly basis, though we do not offer them.

      Kindest Regards,
      Scott M

  33. Hi

    In Download and Convert the SSH Key 

    Step 9 is not working for me.When I paste a passphrase passowrd for a private key it again ask for the password. Please help on solving this.

    1. Hello Anshul,

      Sorry for the problem with step 9. When we reviewed the process, it is working for us. Please make sure that the password you’re using there is the same as the password you used earlier. If the password is not working, try regenerating the password with something that you can re-type. If you’re using cut and paste for the password, there is always the possibility that you’re including a space.

      Regards,
      Arnel C.

  34. @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

    @         WARNING: UNPROTECTED PRIVATE KEY FILE!          @

    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

    Permissions 0666 for ‘id_rsa’ are too open.

    It is required that your private key files are NOT accessible by others.

    This private key will be ignored.

    new-host:desktop TimiteoBlanco$ ssh- add-K

    -bash: ssh-: command not found

    new-host:desktop TimiteoBlanco$ 

    Trying to connect my SSH key to my terminal Macbook Pro OSX Mountain Lion

     

    Thanks,

    Timmy

    1. Hi there, I’ve managed to log in via SSH on my server.
      Initially, all worked well. But now, I keep getting the errors below and cannot even do a ‘ls’ command. Please help!

      -jailshell: fork: retry: Resource temporarily unavailable
      -jailshell: fork: retry: Resource temporarily unavailable
      -jailshell: fork: retry: Resource temporarily unavailable
      -jailshell: fork: retry: Resource temporarily unavailable
      -jailshell: fork: Resource temporarily unavailable

    2. Hello Alvinlim,

      Sorry to hear that you’re having problems with SSH. We need more information about your account in order to troubleshoot the issue. Are you an InMotion Hosting customer? Please provide more information on the account and we can look into the issue in more depth.

      Regards,
      Arnel C.

    3. Thank you for your quick response. I am a customer otherwise I wouldn’t have been able to log in 😉
      I’ll drop an email to support.

  35. I am getting this error now: Are you sure you want to continue connecting (yes/no)? yes
    Failed to add the host to the list of known hosts (/Users/*****/.ssh/known_hosts).

    Permission denied (publickey).

  36. Hi ,

    I followed the above tutorial for SSH , but i got the below error massage 

    “” server refused our key

    no supported authntication method available (server sent:publickey) “”

     

    can you please help

    Thanks 

     

    1. Hello davoud,

      Thank you for your question. This error often occurs when there is no private key setup in putty, or the path is incorrect.

      In the SSH using Putty section of the above article, ensure you have completed Step 2:
      Click Browse under Private key file for authentication, then select the private key you downloaded in the last section, and click Open.

      This should setup the private key as a “supported” authentication method.

      If you have any further questions, feel free to post them below.

      Thank you,
      John-Paul

  37. Awesome, thanks Arn for the step-by-step instructions and JeffMa for hinting where you can get the server name from (Note: you need to “expand stats” in CPanel in the area JeffMa indicates to get the server name).

     

    Regards,

    Justin 

  38. now when i do step 5 

    1. 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.

    Im getting a blank key and error 400 when i try to download anything. Please help.

    1. Hello Ryan,

      Thank you for contacting us today. I spent some time searching online, and this error is typically caused by one of the following:

      Incorrect Hostname, Incorrect key, or Incorrect Username.

      I recommend checking these to ensure they are correct.

      Thank you,
      John-Paul

    2. Hello ryan,

      Thank you for contacting us again. If this is still not working in cPanel, I recommend contacting Live Support.

      This will allow them to to test your server, and replicate the error in your specific account.

      Thank you,
      John-Paul

    1. The server name will be listed in your cPanel to the left. On shared hosting, it will be something like biz123.inmotionhosting.com.

  39. I did the steps to add ssh key to my key chain but i got the following error and can’t find a solution: 

    Ryans-Mac:~ Jarg$ ssh-add -K ~/downloads/id_dsa

    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

    @         WARNING: UNPROTECTED PRIVATE KEY FILE!          @

    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

    Permissions 0640 for ‘/Users/Jarg/downloads/id_dsa’ are too open.

    It is required that your private key files are NOT accessible by others.

    This private key will be ignored.

    1. Hello C. Munque,

      Thanks for the question. Here’s what the -K does (“-k” in lower case is different):

      -K Enables GSSAPI-based authentication and forwarding (delegation) of GSSAPI credentials to the server.

      -k Disables forwarding (delegation) of GSSAPI credentials to the server.

      GSSAPI stands for Generic Security Services Application Program Interface.

      Basically, it’s used to validate the user you’re using to login to SSL. I hope that helps to provide you some information on that command.

      Regards,
      Arnel C.

  40. I got this error message after running the command to add to my MacBookPro.

    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @         WARNING: UNPROTECTED PRIVATE KEY FILE!          @
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    Permissions 0644 for ‘id_dsa’ are too open.
    It is recommended that your private key files are NOT accessible by others.
    This private key will be ignored.

    1. Hello Rami,

      Thank you for the catch. I have updated Step 3 with the correct information.

      If you see any other problems, feel free to let us know.

      Thank you,
      John-Paul

    2. Hello James,

      Thank you for contacting us. I found a post about the WARNING: UNPROTECTED PRIVATE KEY FILE error, in the Official Apple discussion forums, where they (Jeffrey Jones2)provide a possible solution:

      id_dsa should be your private key. If it is a folder, then your configuration is screwy. As you have seen, it is mandatory that this file be readable by the user only.

      In Leopard, the passphrase can be put into your Keychain using the command “ssh-add -K.

      If you have any further questions, feel free to post them below.

      Thank you,
      John-Paul

  41. I figured out my problem – I’d make my key’s password too complicated (lots of special characters and the like). Something about it wouldn’t let the Mac accept it (even though I’d entered it correctly).

    Regenerating with a simpler key got me around the problem.

  42. Arnel,

    I typed it and copied it, but when I enter the command in shell it says no directory found. This was after the cd desktop command. It didn’t ask to create it either. At this point I’m not sure it matters. Tech support said I needed PuttY or xShell. They did say that the server ports were 2222 not 22. But the reason for this was to update the version of Image Magick on the server to have compatibility with a piece of custom software. Unfortunately, they said I would need to upgrade to VPS or Dedicated. So I guess no need now. Thanks.

    1. Hello Matt K.,

      Sorry for the confusion. Unfortunately, even with Putty/Xshell you would not be able to update a shared server’s version of ImageMagick. That can only be done by the Systems team. This would require a support ticket request. However, since this is a server-wide update on a shared server, it would typically not be approved.

      Also, FYI – support is correct in saying you need PuTTY or XShell – but only for PCs. The commands do work above. If you did not have the .SSH directory, you simply needed to create it. The terminal program provided with your Mac is an excellent terminal and no other terminal program is required to connect with SSH. I am working on a tutorial for this very issue to be released soon.

      Regards,
      Arnel C.

  43. re. connecting via Mac: I’ve got my id_dsa copied to ~/.ssh, I’ve changd its permissions to 600 (because the system squaks otherwise) and I’m trying to connect using:

     

    ssh <myUserNam>@secure###.inmotionhosting.com -p 2222

    and I keep getting a Mac dialog box that states:

    “Enter your password for the SSH key “ID_dsa”

    But none of my passwords work! Not my local user pw, not my Inmotion pw, not the pw I created when generating the certificate. What he heck is this asking for?!

     

    1. Hello Chris,

      That is not something that is specific to our servers. I was able to find a bit of information on the web regarding your particular error on an apple-related forum.

      Kindest Regards,
      Scott M

    2. Hello Matt,

      I did try those commands again and they work for me on my Mac Book Pro running OSX Mavericks. Can you tell me what version you’re using and what you’re seeing when you’re trying to run the command?

      Copy the command to make sure that you’re using it correctly. If you’re copying the code by looking at it, it’s easy to mistake the “~” for a dash. Give us some idea of what’s happening, and the actual commands you’re using and we’d be happy to look into it for you.

      Regards,
      Arnel C.

  44. The two commands you listed in steps 12 and 13 do not work. It said directories not found in my terminal. What now?

  45. 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.

    1. 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

  46. 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 [email protected] -p 2222

    or 

    ssh [email protected]: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!

  47. 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 https://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!

    1. 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

    1. Hello Ironstone,

      This is possible now, since SSH access is available on Shared Hosting accounts. 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 [email protected]

        (here’s an example: ssh [email protected])

      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.

  48. 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.

    1. 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?

Was this article helpful? Join the conversation!

Questions about our MailChannels Deployment? We have answers and are here to help!Learn More
+