News for hackers. Stuff that matters.

Server access – There must be a better way

So I've setup a couple of servers on Hetzner. One in particular selfhosts Sentry, Grafana,(Prometheus and Loki).

My SSH key is provisioned...

I need help with DevOps... but there seems to be no simple way to provision another SSH key.

Support suggested this:

"1. Go to the Rescue section of your server, but instead of the (reset root password) button, click the Activate Rescue & Reset button. Your server will then boot into the rescue system. 2. Connect to your server via SSH using the Rescue credentials. 3. execute the following commands in Rescue: mount /dev/sda1 /mnt chroot-prepare /mnt chroot /mnt From this point you can now navigate through the file structure of your Cloud Servers primary disc. SSH keys for the root user are stored in /root/.ssh/authorized_keys.

4. Restart your server using the reboot command and log in using the new SSH key."

But seems pretty scary process on a server running multiple application.

There must be a better way!

( 2 comments | on HN )
Re:Server access – There must be a better way by warrenm on Wednesday April 03, 2024 @11:19AM (#39918610)
You already have your primary ssh key on each server?

Why not just push any other keys "traditionally" using scp?

Re:Server access – There must be a better way by CoolCold on Friday April 05, 2024 @07:00PM (#39948292)
Seems like system administration stuff to add more keys, not yaml/devops engineering.

If you rephrase your question and what prevents you to just add keys after provisioning finishes, I'll try to help