summaryrefslogtreecommitdiff
path: root/data/templates/ssh
diff options
context:
space:
mode:
authorChloe Surett <chloe@surett.me>2025-11-17 11:57:09 -0500
committerChristian Breunig <christian@breunig.cc>2026-01-15 16:25:45 +0100
commit2473e1bfdeeb0ea7cc47a14811c29cc4801c8038 (patch)
tree8bb10b93d70a567f1f0e24bb2625a12e310cb48a /data/templates/ssh
parent0c373c7c9cf0fff573e5acc5642f6af63c311da2 (diff)
downloadvyos-1x-2473e1bfdeeb0ea7cc47a14811c29cc4801c8038.tar.gz
vyos-1x-2473e1bfdeeb0ea7cc47a14811c29cc4801c8038.zip
ssh: T7483: Add fido2 PubkeyAuthOptions
Diffstat (limited to 'data/templates/ssh')
-rw-r--r--data/templates/ssh/sshd_config.j214
1 files changed, 14 insertions, 0 deletions
diff --git a/data/templates/ssh/sshd_config.j2 b/data/templates/ssh/sshd_config.j2
index d5d155340..32f7e23e7 100644
--- a/data/templates/ssh/sshd_config.j2
+++ b/data/templates/ssh/sshd_config.j2
@@ -72,6 +72,20 @@ HostKeyAlgorithms {{ hostkey_algorithm | join(',') }}
PubkeyAcceptedAlgorithms {{ pubkey_accepted_algorithm | join(',') }}
{% endif %}
+{% if fido is vyos_defined %}
+{% set configured_pubkey_options = [] %}
+{% if fido.pin_required is vyos_defined %}
+{% do configured_pubkey_options.append('verify-required') %}
+{% endif %}
+{% if fido.touch_required is vyos_defined %}
+{% do configured_pubkey_options.append('touch-required') %}
+{% endif %}
+{% if configured_pubkey_options | length > 0 %}
+# Sets one or more public key authentication options.
+PubkeyAuthOptions {{ configured_pubkey_options | join(' ') }}
+{% endif %}
+{% endif %}
+
{% if mac is vyos_defined %}
# Specifies the available MAC (message authentication code) algorithms
MACs {{ mac | join(',') }}