Tôi thiết lập sshd để nghe địa chỉ vpn và trong lần khởi động lại tiếp theo, ssh không khởi động được do địa chỉ ip bắt buộc không khả dụng khi khởi động. Vì vậy, tôi đã thêm wg-quick@wg1.service, network.target, network-online.target làm phụ thuộc sshd nhưng ssh vẫn không khởi động được khi khởi động. Khởi động lại sshd sau khi khởi động hoạt động tốt.Làm cách nào để bắt đầu ssh khi khởi động và nghe địa chỉ vpn?
systemctl danh sách phụ thuộc ssh:
ssh.service
â ââ-.mount
â ââsystem.slice
â ââwg-quick@wg1.service
â ââmạng-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
con mèo /etc/systemd/system/ssh.service.d/override.conf:
Sau=wg-quick@wg1.service