Page MenuHomeVyOS Platform

SSH keys with the same name replace each other during system initialization by Cloud-init
Closed, ResolvedPublicBUG

Description

If we have several keys with the same comment, for example:

ssh-rsa <base64> my_user_name
ssh-ed25519 <base64> my_user_name

They are applied one by one by Cloud-init. And since the comment is used as a key name in the CLI config, each next key replaces the previous one.

To fix this, we need to check if a key with the same comment already exists and generate a new unique key name for such cases.

Details

Difficulty level
Easy (less than an hour)
Version
1.5, 1.4.0
Why the issue appeared?
Implementation mistake
Is it a breaking change?
Perfectly compatible
Issue type
Bug (incorrect behavior)

Event Timeline

zsdc changed the task status from Open to In progress.
zsdc claimed this task.
zsdc triaged this task as Normal priority.
zsdc added a project: VyOS 1.4 Sagitta.
zsdc changed Why the issue appeared? from Will be filled on close to Implementation mistake.
zsdc moved this task from Need Triage to In Progress on the VyOS 1.5 Circinus board.
zsdc moved this task from Need Triage to Finished on the VyOS 1.4 Sagitta board.
zsdc moved this task from In Progress to Finished on the VyOS 1.5 Circinus board.