Ask Your Question

F25 SSHD not starting on boot after recent updates?

asked 2017-03-07 15:39:10 -0500

Matt101 gravatar image


I have had a correctly working SSHD setup since I installed F25 on my home server many months ago, and it has worked with issue for months.

I recently ran an upgrade which upgraded the openssh on March 6 2017:

Upgraded openssh-7.4p1-3.fc25.x86_64                @updates
Upgrade          7.4p1-4.fc25.x86_64                @updates
Upgraded openssh-clients-7.4p1-3.fc25.x86_64        @updates
Upgrade                  7.4p1-4.fc25.x86_64        @updates
Upgraded openssh-server-7.4p1-3.fc25.x86_64         @updates
Upgrade                 7.4p1-4.fc25.x86_64         @updates

SSHD now doesn't start during boot with the following error messages appearing:

Mar 07 19:08:22 mbox sshd[1301]: error: Bind to port 54010 on failed: Cannot assign requested address.
Mar 07 19:08:22 mbox sshd[1301]: fatal: Cannot bind any address.
Mar 07 19:08:22 mbox systemd[1]: sshd.service: Main process exited, code=exited, status=255/n/a
Mar 07 19:08:22 mbox systemd[1]: sshd.service: Unit entered failed state.
Mar 07 19:08:22 mbox systemd[1]: sshd.service: Failed with result 'exit-code'.
Mar 07 19:11:07 mbox sshd[2215]: Server listening on port 54010.

I can open a terminal on the box and run: "systemctl start sshd" as root and it will then start without any errors.

I have checked my sshdconfig with: "sshd -t" all fine (and is as was when previously worked), and I had previously allowed the port in selinux with: "semanage port -a -t sshport_t -p tcp 54010"

Any help greatly appreciated?

edit retag flag offensive close merge delete


What do you have as ListenAddress in sshd.conf file?

alcir gravatar imagealcir ( 2017-03-08 02:28:23 -0500 )edit

Matt101 gravatar imageMatt101 ( 2017-03-08 12:57:00 -0500 )edit

1 Answer

Sort by » oldest newest most voted

answered 2017-03-08 03:17:42 -0500

So, I have performed some test. If ListenAddress in the sshd configuration file is set or it is commented (as per default), you should have no problems.

If you have specified an IP on wich sshd has to listen to, then the problem is that sshd starts before the IP is configured. So, to solve this, you have to add to the systemd unit related to sshd.

sudo vi /etc/systemd/system/

Add to Wants and After


Reload systemd

sudo systemctl daemon-reload

Now, after the reboot, the sshd daemon should ben online.

systemctl status sshd
● sshd.service - OpenSSH server daemon
   Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled; vendor preset: disa
   Active: active (running) since Wed 2017-03-08 10:08:31 CET; 22s ago
edit flag offensive delete link more


Hi, your solution worked, thank you!

Matt101 gravatar imageMatt101 ( 2017-03-08 13:11:46 -0500 )edit

Question Tools


Asked: 2017-03-07 15:39:10 -0500

Seen: 621 times

Last updated: Mar 08 '17