From 5deb12c509bea6e353c3b4c3174f040895646cf8 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Thu, 11 Jun 2020 15:58:18 +0200 Subject: ssh: T2321: add VRF support --- data/templates/ssh/override.conf.tmpl | 8 ++++++++ data/templates/ssh/sshd_config.tmpl | 8 ++------ 2 files changed, 10 insertions(+), 6 deletions(-) create mode 100644 data/templates/ssh/override.conf.tmpl (limited to 'data') diff --git a/data/templates/ssh/override.conf.tmpl b/data/templates/ssh/override.conf.tmpl new file mode 100644 index 000000000..1013d4b48 --- /dev/null +++ b/data/templates/ssh/override.conf.tmpl @@ -0,0 +1,8 @@ +[Service] +ExecStart= +{% if vrf %} +ExecStart=/sbin/ip vrf exec {{ vrf }} /usr/sbin/sshd -D $SSHD_OPTS +{% else %} +ExecStart=/usr/sbin/sshd -D $SSHD_OPTS +{% endif %} + diff --git a/data/templates/ssh/sshd_config.tmpl b/data/templates/ssh/sshd_config.tmpl index 949a8558f..08fe56655 100644 --- a/data/templates/ssh/sshd_config.tmpl +++ b/data/templates/ssh/sshd_config.tmpl @@ -28,15 +28,11 @@ UsePAM yes # address maps back to the very same IP address. UseDNS {{ host_validation }} -# Specifies the port number that sshd listens on. The default is 22. +# Specifies the port number that sshd listens on. The default is 22. # Multiple options of this type are permitted. -{% if mport|length != 0 %} -{% for p in mport %} +{% for p in port %} Port {{ p }} {% endfor %} -{% else %} -Port {{ port }} -{% endif %} # Gives the verbosity level that is used when logging messages from sshd LogLevel {{ log_level }} -- cgit v1.2.3