Skip to main content
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Unable to access via SSH

I tried to ssh to the system via xshell, but failed.


The steps are:

1,Activate SSH (cPanel->SSH Access)

2, Generate a pair of new SSH Keys

3, Download the private key and loaded in xshell


Create a new ssh session in xshell to access the system:

1, IP address (cPanel->Website(s) IP Address)

2, Port 22

3, Connection Type SSH


An Error occurred at log in:

Connection closed by foreign host.

Disconnected from remote host(dev) at 15:42:27


Are there anybody have met this problem, please give me some advice, thanks!


Same problem.  Talked to Customer support.  No resolution.  


They believe is a Password mismatch problem - somewhere, but I have reset all passwords plus regenerated keys, copied private key to ~/.ssh as id_rsa .  


SSH does not prompt for password. after command:  ssh -p 22  It reads encryption key id_rsa,  but I get "Connection reset by peer" statement.


Documentation on CPanel is pretty straight forward, but to no avail.  There have been many listed questions/ issues on this topic, but no good resolutions.  


I would love to know what I (and others) are doing incorrectly.  


Hello @chrispcx!


Thank you for posting. It looks like you're doing everything right. I'd recommend reaching out to our support team so they can troubleshoot with you. 


Heather - GoDaddy | Community Moderator
24/7 support available at

Actually, I did reach out twice.  I do believe that they are earnest in their desire to help.  I had a good experience and thought they did a good job helping narrow the issue.


I was able to access another IP  (#2) on the GD system via ssh, but was not able to access my needed GD IP (#1) on either of my 2 local machines.  So it wasn't my local system or GD in general.  Also, the Customer Service person was able to ssh into my server on his system, so it wasn't on my server on GD.


However upon doing a trace route (a Mac Network Utility), there seemed to be an inconsistent IP node in the path.  (Basically a bad link in the chain to IP #1) which could have caused some of the issues. This was determined by the GD representative.  The troubled node was in my ISP's (Comcast) system.  (The path to IP #2 did not go through this node).  


What I did to circumvent the Comcast bad node, was to make my iphone a personal hotspot and connect to it from my laptop.  My Iphone uses ATT via the cell system and therefore I was able to bypass the bad node and ssh into my IP#1.  Slow, but no problem.


This is certainly not a 'solution', however it may indicate that the problem some people may experience, may lay in the path to the IP you are trying to access (once other factors have been eliminated).


I am not knowledgeable enough to say that there is a way to bypass a 'troubled' node, and I am sure that there is a better work-around, or if this is just a temporary bad situation with that node.  I don't know what the best solution is, but this got me to the next step.  I hope it indicates a possible solution.



it is easy:
- open your terminal (I use Mac terminal if you are using windows find your way to the get one) type

ssh -p 22 your_ssh_user_name@your_domain_ip

- it prompts you to enter password (Use SFTP user password) you can find it under SFTP on the right sidebar
- now you are in the domain console

- generate ssh

ssh-keygen -t rsa -b 4096

- press enter until success then cd into ssh directory

cd ~/.ssh/
touch authorized_keys
vim authorized_keys

- paste your machine ssh public id to the `authorized_keys` and save
Now you can ssh to your Domain without password prompting

Best Regards,