SSH connection problems / sshd restart failure

synaptyx

Registered
Jun 11, 2010
4
0
51
Hi guys,
I am a total amateur with regards to server configuration and command line operations, but I am slowly getting there.

I'm having some tricksy problems with SSH/sshd right now and I'm at a loss.

I've searched the forums here and tried a few things as detailed below. If anybody has anything else I could try I'd be eternally grateful.

I could login fine last month, now PuTTY responds with:
Server unexpectedly closed network connection.
I tried to restart the service and got this response:
Restarting SSH Daemon
Waiting for sshd to restart....finished.
sshd (/usr/sbin/sshd) running as root with PID 15776 (pidfile check method)
sshd: [ != SSH]
Aug 2 12:43:41 ipaddress sshd[13778]: Received signal 15; terminating.
sshd has failed, please contact the sysadmin.
I know I didn't change the port from the default of 22, so I removed my keys and re-enabled password auth to keep things simple. I also attempted the autofix method:
https://<SERVERIP>/scripts2/doautofixer?autofix=safesshrestart
The script executed fine, this is the output:
AutoFixer Execution
Requesting script ...
Done.

Executing script ...
Attempting to locate sshd binaries installed on the system ...
Located /usr/sbin/sshd
Done.
Killing exisiting sshd processes...
Stopping sshd: [ OK ]

Done.
configuring sshd to run on port 22
/usr/sbin/sshd successfully started!
root 11609 0.0 0.0 7244 1152 ? Rs 12:09 0:00 /usr/sbin/sshd -f /var/cpanel/safe_sshd
Done.
Unfortunately I still cannot connect via SSH.

I asked support on our hosting platform who responded that the config looked fine and to keep looking for a solution (thanks a bunch!).
 
Last edited:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,270
463
Hello :)

Do you have any firewall applications on your own computer that could restricting your access to SSH? For instance, are you able to connect to any other servers via SSH over port 22?

Or, have you installed a firewall on your server? If so, have you tried disabling it temporarily to rule it out as the cause of the problem?

Thank you.
 

synaptyx

Registered
Jun 11, 2010
4
0
51
OMG, my Host Access Control list was in the wrong £^%$&* order. Thanks Michael that jogged the old noodle.

:D