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.