The service “sshd” appears to be down

Nizzo

Member
Dec 30, 2016
21
2
3
Switzerland
cPanel Access Level
Root Administrator
Hi,

Two questions:
1; Since yesterday I've been getting these notifications about the sshd service being down when it is not.

Jun 18 20:35:36 web sshd[9282]: error: Bind to port XXXX on :: failed: Address already in use.
Jun 18 20:35:36 web sshd[9282]: error: Bind to port XXXX on 0.0.0.0 failed: Address already in use.

I changed the SSH port last year and its been working just fine till last night for some reason.

I tried restarting the sshd service from WHM and through SSH with no luck, i always get the same error.

2; The server is very outdated. its running on:
  • CENTOS 7.3 x86_64 standard – web
  • WHM 60.0 (build 45)
Is it possible to upgrade directly to Version 78.0.30 ?

Thank you.
 

keat63

Well-Known Member
Nov 20, 2014
1,961
267
113
cPanel Access Level
Root Administrator
I guess the experts will tell you as a matter of urgency to update to the latest version.
However, don't let me sway you in any way, I'm not an expert.

Have you tried moving SSH to another port.
 

keat63

Well-Known Member
Nov 20, 2014
1,961
267
113
cPanel Access Level
Root Administrator
Hopefully, the techs will be along shortly to confirm.

I missed a few updates recently and upgraded from 76 to 80 last week.
I'm pretty sure I saw it going through the steps to update to 78 before moving on to 80.
It took a long time though, maybe 90 minutes from start to finish.

If it does go through revisions sequentially, then expect it to take an age.
 

Nizzo

Member
Dec 30, 2016
21
2
3
Switzerland
cPanel Access Level
Root Administrator
Time is not an issue.. i just need to make sure it is done correctly and without breaking things up.

So your saying is the upgrade it self went through 76 to 78 to 80 on its own? or did you have to manually go up each version?

Out of curiosity, what are the specs on your server that it took 90 minutes to upgrade?
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,300
363
Houston
What do you get when you run the following:

Code:
ps faux |grep sshd
Then if you subsequently perform a hard restart on the service:

Code:
/scripts/restartsrv_sshd --restart --hard
Do you continue to get the same error?

You really should update as well, running on v60 of cPanel/WHM more than likely makes you vulnerable to the highly dangerous Exim CVE Exim CVE-2019-10149, how to protect yourself | cPanel Blog

So your saying is the upgrade it self went through 76 to 78 to 80 on its own? or did you have to manually go up each version?
You set the target version - so if you set in WHM>>Server Configuration>>Update Preferences that you want to be on RELEASE it will iterate through the versions on its own from v60 to v80.0.18
 

Nizzo

Member
Dec 30, 2016
21
2
3
Switzerland
cPanel Access Level
Root Administrator
What do you get when you run the following:

Code:
ps faux |grep sshd
Then if you subsequently perform a hard restart on the service:

Code:
/scripts/restartsrv_sshd --restart --hard
Do you continue to get the same error?

You really should update as well, running on v60 of cPanel/WHM more than likely makes you vulnerable to the highly dangerous Exim CVE Exim CVE-2019-10149, how to protect yourself | cPanel Blog



You set the target version - so if you set in WHM>>Server Configuration>>Update Preferences that you want to be on RELEASE it will iterate through the versions on its own from v60 to v80.0.18
Hi,

When i run /scripts/restartsrv_sshd --restart --hard thats what I get:
Code:
]$ sudo /scripts/restartsrv_sshd --restart --hard
[sudo] password for XYZ:
Waiting for “sshd” to start ……Job for sshd.service failed because a configured r                                                                                                             esource limit was exceeded. See "systemctl status sshd.service" and "journalctl                                                                                                              -xe" for details.
…failed.

Service Error
        (XID mu7k2v) The “sshd” service failed to start.

Startup Log
        Jun 22 22:26:56 web systemd[1]: sshd.service never wrote its                                                                                                              PID file. Failing.
        Jun 22 22:26:56 web systemd[1]: Failed to start OpenSSH serve                                                                                                             r daemon.
        Jun 22 22:26:56 web systemd[1]: Unit sshd.service entered fai                                                                                                             led state.
        Jun 22 22:26:56 web systemd[1]: sshd.service failed.

Log Messages
        Jun 22 22:26:56 web sshd[1791]: fatal: Cannot bind any address.
        Jun 22 22:26:56 web sshd[1791]: error: Bind to port 1007 on :: failed: A                                                                                                             ddress already in use.
        Jun 22 22:26:56 web sshd[1791]: error: Bind to port 1007 on 0.0.0.0 fail                                                                                                             ed: Address already in use.

sshd has failed. Contact your system administrator if the service does not autom                                                                                                             agically recover.
I am going to Update, i just wanted to make sure that i can upgrade from v60 to the latest without breaking anything.

Any precaution i can take before attempting the upgrade?
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,300
363
Houston
Hi @Nizzo


I think the real issue here is the custom port you've set for SSH. It sounds like something else is already listening on that port. I'd suggest using an unused port between 1024 and 32,767

As far as the upgrade, I can't say for certain that you won't experience downtime but you shouldn't, it really depends on if there are issues or not, if you would like you can open a ticket using the link in my signature and we'd be more than happy to assist.
 

Nizzo

Member
Dec 30, 2016
21
2
3
Switzerland
cPanel Access Level
Root Administrator
Hi @Nizzo


I think the real issue here is the custom port you've set for SSH. It sounds like something else is already listening on that port. I'd suggest using an unused port between 1024 and 32,767

As far as the upgrade, I can't say for certain that you won't experience downtime but you shouldn't, it really depends on if there are issues or not, if you would like you can open a ticket using the link in my signature and we'd be more than happy to assist.
@cPanelLauren

Thank you. Something is weird happening in the server, that is for sure.

I changed the SSH port to a different port and it restarted fine this time and no more notifications, but at the same time i can still SSH with the old port? also disabling root login in SSH does not take effect either.

I think i will do a fresh install of WHM/OS..

Now i cant decide if i should upgrade WHM and then reinstall or just reinstall from scratch.
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,300
363
Houston
You might save yourself some time if you reinstall from scratch if you do choose that route.

Could it also be that you've left 22 in the config for SSH or not restarted SSH?