#986761 openssh fails to start when using ListenAddress and systemd-network

#986761#5
Date:
2021-04-11 17:15:42 UTC
From:
To:
Hi,

on systems with multiple interfaces, we tend to use 'ListenAddress' in
sshd_config to ensure that openssh only runs on the local management
interface.

now, with vanilla bullseye systems using ifupdown this works.

once switching to systemd-networkd, this fails. openssh logs the 'cannot
bind to address' error because the (statically configured) IP on the
interface is not up yet.

I guess systemd-networkd reports "network.target" to early that it
completed its stuff (when it has not).

once I remove the ListenAddress, everything works again as usual.

Regards,
Daniel