Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • I'll try replacing After=network.target with After=network-online.target. It strikes me that this should be the default behavior anyway. The listen address was changed to tighten security, and I prefer to leave as is. I have other computers that work fine with a specific listen address specified. This computer must have more delay than the others in obtaining an address via DHCP. Commented May 7, 2018 at 1:26
  • Instead of manually creating the drop-in directory and file for sshd.service, you can also use systemd edit sshd.service (prepending sudo as required.) The main difference is that the resulting file is always called override.conf, and the unit is automatically reloaded if you commit the changes. Commented May 7, 2018 at 4:41
  • Did this work for anyone? I have tried this and logs show that network-online does finish before ssh tries to start, but ssh still fails because it cannot bind. Commented Feb 10, 2019 at 6:43
  • Thanks! Although I set it to start after NetworkManager-wait-online.service instead (Centos 8) and this worked for me. Nothing else – including making it require NetworkManager-wait-online.service – would work for me. Commented Dec 14, 2019 at 3:06