I screwed up and accidentally deleted some files on my Proxmox server

corneliusmixon

New Member
Oct 3, 2022
2
0
1
I was following Learn Linux TV video tutorial to create a VM template. I mistakenly ran the following commands on the Proxmox server and not the VM:
sudo rm /etc/ssh/ssh_host_*
sudo truncate -s 0 /etc/machine-id
sudo ln -s /etc/machine-id /var/lib/dbus/machine-id

I still have console access but no ssh capability. How do I fix SSH access and anything else I may have screwed up? This Proxmox server is part of my homelab but has about a dozen VMs currently on it. So I would like to avoid a fresh install. Hopefully its a simple fix.

Note: I'm a network guy trying to learn some sysadmin skills. I know enough about Linux to be dangerous.
 
I don't think you can recreate the SSH host keys or machine-id from thin air. Did you backup the /etc directory on the Proxmox host (at any point in time, since those files don't change much)?
There is probably a Linux guide on the internet about creating new SSH host keys. I have no idea how that would affect Proxmox software but maybe it's alright for a stand-alone host.
 
  • Like
Reactions: Kingneutron

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!