[SOLVED] /root/.ssh/authorized_keys overwritten

comfreak

Member
May 20, 2020
46
12
13
34
Hi,

i have accidentally overwritten the file /root/.ssh/authorized_keys (more specific the file /etc/pve/priv/authorized_keys, as /root/.ssh/authorized_keys is a simlink to /etc/pve/priv/authorized_keys) in our Proxmox HA cluster. Now I can not login from the WebUI to other nodes VM consoles anymore. Everything else seems still to work.

I searched a bit around and found
Bash:
pvecm updatecerts

or

pvecm updatecerts --force true

Is this the correct command to restore (generate a new) the key again? I just want to make sure not do destroy something else (the current wrong key inside the file can be deleted/overwritten...).

Thanks!

edit: more details
 
Last edited:
Solved!

I copied the public SSH key from /root/.ssh/id_rsa.pub of ervery node to the /root/.ssh/authorized_keys file. As that gets synced via the HA cluster to all nodes, I just needed to put it on one node.
 
For example, I do it like this:


7z a '-xr!lxcfs*' '-xr!defer*' '-xr!var/lib/vz/template*' /mnt/backup/proxmox.7z /etc /var /opt /root /usr
 
  • Like
Reactions: eleanor

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!