summaryrefslogtreecommitdiff
path: root/etc/systemd/system/sshd-ns0.service
diff options
context:
space:
mode:
authorXiao Pan <xyz@flylightning.xyz>2025-08-29 06:30:36 +0000
committerXiao Pan <xyz@flylightning.xyz>2025-08-29 06:30:36 +0000
commit4fb621933387c21f6f09676850e6f0ce0dd7cd3f (patch)
tree7dcb4b12821c9249f350e44e38a1af7e9364ca6b /etc/systemd/system/sshd-ns0.service
parent7b71c3e3d55e4d1a6e74680e071e33abdd4d6466 (diff)
ibb netns also run sshd, so when I vpn to ibb I can ssh to it
Diffstat (limited to 'etc/systemd/system/sshd-ns0.service')
-rw-r--r--etc/systemd/system/sshd-ns0.service19
1 files changed, 19 insertions, 0 deletions
diff --git a/etc/systemd/system/sshd-ns0.service b/etc/systemd/system/sshd-ns0.service
new file mode 100644
index 00000000..d66b8932
--- /dev/null
+++ b/etc/systemd/system/sshd-ns0.service
@@ -0,0 +1,19 @@
+# modified from /usr/lib/systemd/system/sshd.service
+
+[Unit]
+After=network.target sshdgenkeys.service
+Before=ssh-access.target
+Description=OpenSSH Daemon
+Documentation=man:sshd(8) man:sshd_config(5)
+Wants=sshdgenkeys.service ssh-access.target
+After=ns0.service
+
+[Service]
+Type=notify-reload
+ExecStart=/usr/bin/sshd -D
+KillMode=process
+Restart=always
+NetworkNamespacePath=/run/netns/ns0
+
+[Install]
+WantedBy=multi-user.target