Skip to content

Commit

Permalink
enable %C token if both server and client support it
Browse files Browse the repository at this point in the history
  • Loading branch information
macno authored and gizero committed Oct 9, 2023
1 parent 5e1402e commit f08c366
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tasks/sshd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,14 @@
- name: Set AuthorizedKeysCommand config snippet 2
set_fact:
theo_agent_sshd_authorized_keys_command_computed: "{{ theo_agent_sshd_authorized_keys_command_computed }} -fingerprint %f"
when: sshd_current_version is version('6.9', '>=')
when: sshd_current_version is version('6.9', '>=') and (sshd_current_version is version('9.4', '<') or theo_agent_version is version('0.16', '<')

- name: Set AuthorizedKeysCommand config snippet 3
set_fact:
theo_agent_sshd_authorized_keys_command_computed: "{{ theo_agent_sshd_authorized_keys_command_computed }} -connection %C -fingerprint %f"
when: sshd_current_version is version('9.4', '>=') and theo_agent_version is version('0.16', '>=')

- name: Set AuthorizedKeysCommand config snippet 4
set_fact:
theo_agent_sshd_authorized_keys_command_computed: "{{ theo_agent_sshd_authorized_keys_command_computed }} %u"
when: theo_agent_sshd_authorized_keys_command_computed != theo_agent_path
Expand Down

0 comments on commit f08c366

Please sign in to comment.