summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cloudinit/config/cc_vyos.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/cloudinit/config/cc_vyos.py b/cloudinit/config/cc_vyos.py
index a9a71244..16bd2c17 100644
--- a/cloudinit/config/cc_vyos.py
+++ b/cloudinit/config/cc_vyos.py
@@ -494,7 +494,9 @@ def handle(name, cfg, cloud, log, _args):
# configure system logins
# Prepare SSH public keys for default user, to be sure that global keys applied to the default account (if it exist)
- ssh_keys = metadata_v1['public_ssh_keys']
+ # If the ssh key is left emty on an OVA deploy the OVF datastore passes an empty string which generates an invalid key error.
+ # Set the ssh_keys variable from the metadata_v1['public_ssh_keys'] checked for empty strings.
+ ssh_keys = [key for key in metadata_v1['public_ssh_keys'] if key ]
# append SSH keys from cloud-config
ssh_keys.extend(cfg.get('ssh_authorized_keys', []))
# Configure authentication for default user account