I setup sshd to listen on vpn address and on next restart, ssh failed to start due to the required ip address not available on boot. So i add [email protected], network.target, network-online.target as sshd dependency but ssh still failed to start at boot. Restart sshd after boot up works just fine. How to make ssh start at boot and listen to vpn address?
systemctl list-dependencies ssh:
ssh.service
● ├─-.mount
● ├─system.slice
● ├─[email protected]
● ├─network-online.target
● │ └─networking.service
● └─sysinit.target
● ├─apparmor.service
● ├─blk-availability.service
● ├─dev-hugepages.mount
● ├─dev-mqueue.mount
● ├─finalrd.service
● ├─keyboard-setup.service
● ├─kmod-static-nodes.service
● ├─lvm2-lvmpolld.socket
● ├─lvm2-monitor.service
● ├─open-iscsi.service
● ├─plymouth-read-write.service
● ├─plymouth-start.service
● ├─proc-sys-fs-binfmt_misc.automount
● ├─resolvconf.service
● ├─setvtrgb.service
● ├─sys-fs-fuse-connections.mount
● ├─sys-kernel-config.mount
● ├─sys-kernel-debug.mount
● ├─sys-kernel-tracing.mount
● ├─systemd-ask-password-console.path
● ├─systemd-binfmt.service
● ├─systemd-boot-system-token.service
● ├─systemd-hwdb-update.service
● ├─systemd-journal-flush.service
● ├─systemd-journald.service
● ├─systemd-machine-id-commit.service
● ├─systemd-modules-load.service
● ├─systemd-pstore.service
● ├─systemd-random-seed.service
● ├─systemd-sysctl.service
● ├─systemd-sysusers.service
cat /etc/systemd/system/ssh.service.d/override.conf:
[email protected]