File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change 1+ # An ansible playbook to configure the SSHD configuration to enable CA cert auth for SSH.
2+ # Remember to export CI_CLOUD if it isn't part of your environment's variables.
3+
4+ # NOTE: Change the src for the `ssh_signing_key.pub` to be your corresponding directory.
5+
6+ - hosts : login
7+ gather_facts : true
8+ become : true
9+ tasks :
10+ - name : Copy ssh public key
11+ ansible.builtin.copy :
12+ src : /var/lib/rocky/conch/ssh_signing_key.pub
13+ dest : /etc/ssh/ca_user_key.pub
14+ owner : root
15+ group : root
16+ mode : ' 0644'
17+ remote_src : true
18+
19+ - name : Ensure CA Certs are accepted
20+ ansible.builtin.lineinfile :
21+ line : ' TrustedUserCAKeys /etc/ssh/ca_user_key.pub'
22+ dest : /etc/ssh/sshd_config
23+
24+ - name : Restart SSH service
25+ ansible.builtin.systemd :
26+ name : sshd
27+ state : restarted
You can’t perform that action at this time.
0 commit comments