Skip to content

Commit 56fec03

Browse files
author
Cloud User
committed
Ansible playbook to configure sshd for Conch CA certs.
1 parent c7f3b24 commit 56fec03

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

ansible/ca-cert.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
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

0 commit comments

Comments
 (0)