In a nutshell, although the "After=network-online.target" change can be considered to be a workaround here, I find it quite unlikely that the Debian maintainer (and therefore Ubuntu) will accept a patch proposing to use this statement in openssh's systemd service file. You can find a rationale by Colin in the bug I mentioned above.
It seems like I can't add another Debian bug reference to this bug, but I found this one to be a very interesting read:
https:/ /bugs.debian. org/cgi- bin/bugreport. cgi?bug= 982950
In a nutshell, although the "After= network- online. target" change can be considered to be a workaround here, I find it quite unlikely that the Debian maintainer (and therefore Ubuntu) will accept a patch proposing to use this statement in openssh's systemd service file. You can find a rationale by Colin in the bug I mentioned above.
In a way, I think this bug is similar to https:/ /bugs.launchpad .net/ubuntu/ +source/ nfs-utils/ +bug/1918141, and we still don't seem to have a good "silver bullet" for these cases...