summaryrefslogtreecommitdiff
path: root/data/templates/login/authorized_keys.j2
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-05-01 19:18:53 +0200
committerChristian Poessinger <christian@poessinger.com>2022-05-01 19:18:53 +0200
commit3f657383cdd96b984c594bb8323a714d7a692f11 (patch)
tree0cdba8dcaef38434eed25278d02c65e3e6ac4408 /data/templates/login/authorized_keys.j2
parent7c71e956e8e1779acd82b130ea149ec761520953 (diff)
downloadvyos-1x-3f657383cdd96b984c594bb8323a714d7a692f11.tar.gz
vyos-1x-3f657383cdd96b984c594bb8323a714d7a692f11.zip
login: T4353: fix Jinja2 linting errors
Diffstat (limited to 'data/templates/login/authorized_keys.j2')
-rw-r--r--data/templates/login/authorized_keys.j29
1 files changed, 9 insertions, 0 deletions
diff --git a/data/templates/login/authorized_keys.j2 b/data/templates/login/authorized_keys.j2
new file mode 100644
index 000000000..aabca47cf
--- /dev/null
+++ b/data/templates/login/authorized_keys.j2
@@ -0,0 +1,9 @@
+### Automatically generated by system-login.py ###
+
+{% if authentication.public_keys is vyos_defined %}
+{% for key, key_options in authentication.public_keys.items() %}
+{# The whitespace after options is wisely chosen #}
+{{ key_options.options ~ ' ' if key_options.options is vyos_defined }}{{ key_options.type }} {{ key_options.key }} {{ key }}
+{% endfor %}
+{% endif %}
+