diff --git a/src/conf_mode/service_ssh.py b/src/conf_mode/service_ssh.py index 74d96287650..c9054a5dc19 100755 --- a/src/conf_mode/service_ssh.py +++ b/src/conf_mode/service_ssh.py @@ -120,6 +120,9 @@ def generate(ssh): call(f'ssh-keygen -q -N "" -t ed25519 -f {key_ed25519}') if 'trusted_user_ca_key' in ssh: + ... + elif os.path.exists(trusted_user_ca_key): + os.unlink(trusted_user_ca_key) ca_key_name = ssh['trusted_user_ca_key']['ca_certificate'] pki_ca_cert = ssh['pki']['ca'][ca_key_name]