1

When I create a server in the Hetzner Cloud Console via the "Add Server" option, I can configure the server Location, Image, Type, Networking and SSH Keys among other settings. When the server using a Debian or Ubuntu image is created, selected SSH keys are installed into /root/.ssh/authorized_keys.

Once the server is created, I can open it in the Cloud Console web interface and select the Rebuild tab. On the Rebuild tab the only setting I can change is the Image, e.g. "Debian 10", "Debian 11", "Ubuntu 22.04". Then I click Rebuild and the server is rebuilt with the same SSH keys as I have selected previously.

How can I rebuild the server with previously selected settings, but a different set of authorized SSH keys?

I have searched the Server Fault, but found only the questions regarding preserving the server SSH key. This is not my problem, I am ok with the server SSH key being changed every time I rebuild the server.

I have looked into /etc/cloud configuration, thinking that it may be used to configure the server SSH keys, but did not find the list of SSH keys there.

The settings are definitely stored somewhere outside the image or snapshot, because I can switch between Debian and Ubuntu with the setting being preserved.

1
  • I ran into this same issue and couldn't find a way to fix it. Even if there's just one key in the account and it's set to standard it is not being used during a rebuild. My workaround was to delete the server, take note of the configuration, preserve the IP and re-create it attaching the just freed up IP address. Oct 27, 2023 at 7:16

0

You must log in to answer this question.

Browse other questions tagged .