Skip to content

update-ssh-keys not working to add a secondary or tertiary entry in authorized_keys for user #1554

@bignay2000

Description

@bignay2000

Description

Flatcar overwrites the authorized_keys file on reboot, so ’update-ssh-keys’ is required to update the exisiting authorized_keys file.

update-ssh-keys program runs forever without any output to console when running the command:

update-ssh-keys -u joeadmin -a 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBZ7E5LpKNYXpfrG39mK+Qwoks+fGmidJBcPdfaZvMFZ joe.smoe@smoe.com'

Impact

Unable to add additional ssh keys to a user account’s authorized_keys file that is persistent after the VM is provisioned. Without SSH keys for this admin account, would have to share a password.

Environment and steps to reproduce

  1. New Flatcar Stable (Flatcar Container Linux by Kinvolk 3975.2.1 (Oklo))
  2. Azure VM Image: kinvolk:flatcar-container-linux:stable-gen2:latest
  3. ignition file containing a user with a ssh key
  4. Log into the Flatcar VM.
  5. sudo -i
  6. update-ssh-keys -u joeadmin -a 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBZ7E5LpKNYXpfrG39mK+Qwoks+fGmidJBcPdfaZvMFZ joe.smoe@smoe.com

Expected behavior

update-ssh-keys should not run forever. Return an error and implement a timeout.

Additional Information

Really be great to add a few examples in the help file - update-ssh-keys -h

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions