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.
- How to Connect to your Server with SSH (Video)
- How to Generate an SSH Key
- How to Authorize an SSH Key
- Convert and Download the SSH Key
- SSH using PuTTY
- For Basic Terminal Emulators
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.
- Login to the cPanel that you want to connect to using SSH.
- Under Security click SSH Access.
- Click Manage SSH Keys.
- Then click Generate a New Key.
- Type in a strong password, then click in the field below it and type the password again.
- 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.
- Login to the cPanel that you want to connect to using SSH.
- Under Security click SSH Access.
- Click Manage SSH Keys.
- 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.
- 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
- Login to the cPanel that you want to connect to using SSH.
- Under Security click SSH Access.
- Click Manage SSH Keys.
- Under Private Keys click View/Download next to the Private key you want to use.
- 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.
- 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.
SSH Using PuTTY
- Open PuTTY, under Connection click SSH, then Auth.
- Click Browse under Private key file for authentication, then select the private key you downloaded in the last section. Click Open.
- Click Session and under port enter: 2222
- 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.
- You will see “Login As“. Enter your cPanel username and then hit Enter.
- 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.
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).
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.
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!
The image is old. That line is likely unnecessary. Sorry for any inconvenience.
In SSH Using PuTTY section, my port is 22, can you update this article? Thanks for InMotion Hosting’s documents.
Are you sure you’re on shared hosting instead of a VPS?
Thank you for reminding me, my server is VPS instead of shared hosting. This article How to Connect to your Server with SSH is right for me.
Glad to hear that you found the right resource!
I got an error “your shell acces is not enable on your acoount “.
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.
I got an error “Server refused our key”
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 !
What kind of error are you getting when you run your script?
voilà! – I got connected
Follow all the instructions with just this change
check pre-authentication and
uncheck Bypass authentication
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
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.
thanks.. your commet saved me from having headaches for hours
Every time I start conntction error occures:
connection timed out.
I even tried using shared IP. But it is not working.
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.
after useing putty to connect toserveri get the following error
server sent disconnect massage type2 (protocol error) bad service request ss-connection
please advice
I found a post online where they discuss possible solutions for the bad service request error in putty
Thank you,
John-Paul
I get “wrong passphrase” when trying to convert my key to ppk. Help?
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!
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
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”
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
What issues are you still having?
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.
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
For anyone using linux to connect via SSH, this is what I did to connect successfully. It’s mostly the same as MacOS.
Hope that helps.
I’m using terminal via linux. What is the process for the key?
You should be able to follow the steps in our guide on Connecting to a Shared Server SSH with a Mac, since they are both unix based.
Thank you,
John-Paul
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.
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.
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.
I have tried in all ways I also do not seam ssh access
I recommend contacting Live Support so they review the logs for additional clues and test within your specific account.
Thank you,
John-Paul
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
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
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.
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.
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..
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.
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
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.
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.
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.
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!
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.
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.
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.
But how do I get puttygen? I don’t know where to download it from.
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.
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.
Hello Nick,
Thank you for contacting us. As a test, try using your Shared IP address, instead of your domain name.
Thank you,
John-Paul
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?
Hello George,
Where are you seeing this error? Is it within the AMP or cPanel?
Best Regards,
TJ Edens
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
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/perl5m*****k@m******k.pipelinecourse.com [~]#
Which is apparently showing me connected to the server meow. Since a
pwd
shows me in /home/m*******kls
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.
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.
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
Hello Dyllon,
puttygen is uses to convert the key. You can use puttygen on Linux to do that as well.
Kindest Regards,
Scott M
Hello,
For VPS you can simply SFTP to port 22 as root using normal methods.
Kindest Regards,
Scott M
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
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.
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
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
Hello Malikas,
Have you added your IP address to the firewall within cPanel? Also you may want to contact our support department so they may troubleshoot your connectivity issue live.
Best Regards,
TJ Edens
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!
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!
Hello Garrote,
on a shared or reseller server, that will need to be done via the cPanel.
Kindest Regards,
Scott M
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
Download and Convert the SSH Key
thats step 6 in this section
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…
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.
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 ?
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.
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.
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 ?
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
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.
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.
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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
Hello Timmy,
This error is usually caused by the permission level of the “id_dsa” file. Instead of 666, it should be set to 644.
Here is a helpful guide on setting permissions on Mac OSX, I found online.
Thank you,
John-Paul
I’m a *&^%$#%^^ MAC USER.
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
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.
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.
Hello JD,
Thank you for contacting us. If you need help connecting your Mac, please see our guide Connecting to a Shared Server SSH with a Mac.
Thank you,
John-Paul
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).
Hello Romeo,
Have you tried re-creating the key? If so and are still getting the error, you may want to contact our Live Support team to see if they can help you with an account specific issue.
Kindest Regards,
Scott M
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
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
dont know but steps are not working
Could you clarify what particular step you are having trouble with?
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
now when i do step 5
Im getting a blank key and error 400 when i try to download anything. Please help.
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
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
I am now having the problem when i ssh to my server saying ssh [email protected] -p 2222
Permission denied (publickey).
also, what server is the correct server address? There are several listed in the cpanel. The shared hosting one?
The server name will be listed in your cPanel to the left. On shared hosting, it will be something like biz123.inmotionhosting.com.
I got passed the chmod 400 part and added key to my keychain now when i try and run:
ssh [email protected] -p 2222 I get permission denied error
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.
Hello Ryan,
Thank you for contacting us. I found some posts, where changing the permissions on the key file to 400 helped.
Also, see our guide on how to SSH to a Shared Server using OSX.
If you have any further questions, feel free to post them below.
Thank you,
John-Paul
What is the -K option in ‘ssh-add -K id_dsa’? Haven’t found documentation for that yet.
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.
The file was downloaded and saved to the desk-top as instructed? I’ll read up on your reference further.
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.
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
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
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.
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.
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.
step 3 in first part needs modification (generate new key)
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?!
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
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.
The two commands you listed in steps 12 and 13 do not work. It said directories not found in my terminal. What now?
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.
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
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!
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!
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
How can I connect to my shared hosting shell via SSH on a Mac or Linux machine?
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.
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.
ssh-add -K id_dsa
You will then need to type in the password you used to generate the key in cPanel.
ssh [email protected]
(here’s an example: ssh [email protected])
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.
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.
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.
my password got !@#& simbol,in the PuTTY said -bash: !@#& event not found.
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?