[SOLVED] /root/.ssh/authorized_keys overwritten

comfreak

Active Member
May 20, 2020
46
13
28
35
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