Skip to content

Commit

Permalink
T6013: Remove trusted_user_ca_key when the configuration does not exist.
Browse files Browse the repository at this point in the history
Co-authored-by: Simon <[email protected]>
  • Loading branch information
takehaya and sarthurdev committed Dec 21, 2024
1 parent d3d514b commit de1cda8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/conf_mode/service_ssh.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ def generate(ssh):
write_file(
trusted_user_ca_key, '\n'.join(encode_certificate(c) for c in ca_full_chain)
)
elif os.path.exists(trusted_user_ca_key):
os.unlink(trusted_user_ca_key)

render(config_file, 'ssh/sshd_config.j2', ssh)

Expand Down

0 comments on commit de1cda8

Please sign in to comment.