Proxmox Host SSH keys: Difference between revisions
Jump to navigation
Jump to search
Created page with " May 3, 2024 Add bookmark #59 ufear said: So, if anybody runs into this. I couldn't get updatecerts to add keys for reinstalled nodes to the global /etc/pve/priv/ssh_known_hosts; however the folder /etc/pve/nodes/<nodename> contains a ssh_known_hosts file which contains the content you need; copy it over and the world is good again. Your post put me in the right track and it seems I'm able to connect by WebGUI shell from any host to any host in..." |
No edit summary |
||
(3 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
== Intended method: == | |||
Delete old ssh host keys: | |||
rm /etc/ssh/ssh_host_* | |||
Reconfigure OpenSSH Server: | |||
dpkg-reconfigure openssh-server | |||
Update all ssh client(s) at ~/.ssh/known_hosts | |||
Then update certs and keys ''on each machine'': | |||
pvecm updatecerts -f | |||
== Manual method<ref>https://forum.proxmox.com/threads/pvecm-updatecert-f-not-working.135812/page-3#post-660500</ref>: == | |||
If this fails (which it might), log into each troublesome node through SSHd and copy the public key from | |||
/etc/ssh/ssh_host_rsa_key.pub. | |||
Copy this to | |||
/etc/pve/nodes/<node>/ssh_known_hosts | |||
and prepend it with that machine's hostname. Assuming a hostname of pve1, this line should appear as | |||
pve1 ssh-rsa <key> | |||
Then restart the SSH daemon: | |||
systemctl restart sshd | |||
/ | |||
( | |||
/etc/ssh/ssh_host_rsa_key.pub | |||
to | |||
/etc/pve/nodes/<node>/ssh_known_hosts | |||
Latest revision as of 18:46, 13 December 2024
Intended method:
Delete old ssh host keys:
rm /etc/ssh/ssh_host_*
Reconfigure OpenSSH Server:
dpkg-reconfigure openssh-server
Update all ssh client(s) at ~/.ssh/known_hosts
Then update certs and keys on each machine:
pvecm updatecerts -f
Manual method[1]:
If this fails (which it might), log into each troublesome node through SSHd and copy the public key from
/etc/ssh/ssh_host_rsa_key.pub.
Copy this to
/etc/pve/nodes/<node>/ssh_known_hosts
and prepend it with that machine's hostname. Assuming a hostname of pve1, this line should appear as
pve1 ssh-rsa <key>
Then restart the SSH daemon:
systemctl restart sshd