summaryrefslogtreecommitdiff
path: root/data/templates/ssh/override.conf.j2
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-04-14 21:34:52 +0200
committerChristian Poessinger <christian@poessinger.com>2022-04-14 21:34:52 +0200
commitdbfc2add3434638628b43ecfa097fbd166c85db7 (patch)
treeab219e511f48223fe18168e4bd9c3f4a1854c346 /data/templates/ssh/override.conf.j2
parentb0acc3a58f75f01ff19dbc9544e681cfc9d50c8e (diff)
downloadvyos-1x-dbfc2add3434638628b43ecfa097fbd166c85db7.tar.gz
vyos-1x-dbfc2add3434638628b43ecfa097fbd166c85db7.zip
ssh: T4353: fix Jinja2 linting errors
Diffstat (limited to 'data/templates/ssh/override.conf.j2')
-rw-r--r--data/templates/ssh/override.conf.j213
1 files changed, 13 insertions, 0 deletions
diff --git a/data/templates/ssh/override.conf.j2 b/data/templates/ssh/override.conf.j2
new file mode 100644
index 000000000..e4d6f51cb
--- /dev/null
+++ b/data/templates/ssh/override.conf.j2
@@ -0,0 +1,13 @@
+{% set vrf_command = 'ip vrf exec ' ~ vrf ~ ' ' if vrf is vyos_defined else '' %}
+[Unit]
+StartLimitIntervalSec=0
+After=vyos-router.service
+ConditionPathExists={{ config_file }}
+
+[Service]
+ExecStart=
+ExecStart={{ vrf_command }}/usr/sbin/sshd -f {{ config_file }} -D $SSHD_OPTS
+Restart=always
+RestartPreventExitStatus=
+RestartSec=10
+RuntimeDirectoryPreserve=yes