Skip to content

Reset SSH key pair doesn't work #11910

Closed
Closed

Description

@rp-

problem

Starting a ubuntu cloud image without a key assigned, then poweroff and use "reset SSH key pair" pick your key.
Start the VM an the key will not be set and ssh access doesn't work.
I'm pretty sure it also doesnt work if another key was set before, it works if you pick a key from create instance.

versions

4.19.3
Tried with NFS primary storage and Linstor.

The steps to reproduce the bug

  1. create a ubuntu cloud image instance without key pair
  2. stop VM
  3. reset ssh key pair
  4. start VM
  5. ssh login doesn't work, because key isn't set

What to do about it?

No response

Activity

  1. added this to the 4.20.3 milestone on Oct 27, 2025
  2. added theissue type on Oct 27, 2025
  3. adietrich-ussignal commented on Oct 28, 2025

    @adietrich-ussignal

    Could this be more related to when cloud-init runs? I have seen some behavior where cloud-init will only run actions related to SSH keys on first boot.

  4. rp- commented on Oct 28, 2025

    @rp-
    ContributorAuthor

    I have no idea how the "reset SSH key" is implemented, but just from the name of it, it sounds like it could fix it after the first boot.

    But maybe then it is more a documentation/naming issue.

  5. weizhouapache commented on Oct 28, 2025

    @weizhouapache
    Member

    I have no idea how the "reset SSH key" is implemented, but just from the name of it, it sounds like it could fix it after the first boot.

    But maybe then it is more a documentation/naming issue.

    the issue is with ubuntu cloud image, not cloudstack.

    you can retry after change in /etc/cloud/cloud.cfg : - ssh ==>- [ ssh, always]

  6. rp- commented on Oct 28, 2025

    @rp-
    ContributorAuthor

    I have no idea how the "reset SSH key" is implemented, but just from the name of it, it sounds like it could fix it after the first boot.
    But maybe then it is more a documentation/naming issue.

    the issue is with ubuntu cloud image, not cloudstack.

    you can retry after change in /etc/cloud/cloud.cfg : - ssh ==>- [ ssh, always]

    Ok so it would work, but only if the correct cloud-init options are set, sorry I just didn't know this.

  7. locked and limited conversation to collaborators on Oct 29, 2025
  8. converted this issue into a discussion #11924 on Oct 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions