[Bug 216847] Re: sshd will not start at boot if ListenAddress is set, because network interface is not yet up
Con
216847 at bugs.launchpad.net
Fri Jun 21 01:25:18 UTC 2019
@ahasenack, I found this post (took plenty of Google foo) but it was
helpful.
For anyone else, 18.04 LTS STILL has this issue. The following fixed
it:
After=network-online.target
Wants=network-online.target
These are in my [Unit] section at the top of
/etc/systemd/system/sshd.service
<code_paste_from_service_file>
[Unit]
Description=OpenBSD Secure Shell server
After=network-online.target auditd.service
Wants=network-online.target
ConditionPathExists=!/etc/ssh/sshd_not_to_be_run
[Service]
</code_paste_from_service_file>
I hope this is helpful to others!
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to openssh in Ubuntu.
https://bugs.launchpad.net/bugs/216847
Title:
sshd will not start at boot if ListenAddress is set, because network
interface is not yet up
Status in portable OpenSSH:
Unknown
Status in openssh package in Ubuntu:
Confirmed
Bug description:
Binary package hint: openssh-server
The sshd will not start at boot if the ListenAddress option in
/etc/ssh/sshd_config is set to an IPv4 address other then 0.0.0.0 .
I am using Ubuntu 7.10 and the version 1:4.6p1-5ubuntu0.2 of the openssh-server package.
I would expect that sshd is started after boot but it will not and I found this in /var/log/auth.log:
sshd[4527]: error: Bind to port 22 on 10.1.1.22 failed: Cannot assign requested address.
sshd[4527]: fatal: Cannot bind any address.
Once the System is started you can start/stop the sshd with the
/etc/init.d/ssh script without any problems.
To manage notifications about this bug go to:
https://bugs.launchpad.net/openssh/+bug/216847/+subscriptions
More information about the foundations-bugs
mailing list