I have a couple of FreeBSD VMs on Vultr. For quite some time sshd regularly dies on one of them and I am not sure why.
A couple of theories I’ve had is that maybe
a) my VM was compromised and there is a persistent rootkit installed that kills sshd, or
b) file corruption after previous unclean shutdown has left some file needed by sshd corrupted and it leads to this behaviour, or
c) maybe it’s running out of memory sometimes
Each time I want to ssh into the machine I usually have to first connect with the VNC from the vultr dashboard to start sshd up again.
It’s running the latest FreeBSD, as every now and then I log in and do an upgrade on it some time after a new version has been released.
A persistent rootkit may have been installed if it was compromised between when some vulnerability became known and when I later upgraded next time.
If a file was corrupted in an unclean shutdown in the past maybe it’s a file that has not been changed between FreeBSD versions so even though upgrades replace some files maybe it’s the same corrupted file all along.
Ideally I’d just reinstall the machine, but that’s always more of a hassle than it should be so I continue running the VM in this broken state where sshd keeps dying every now and then.
I have run OpenBSD on Vultr for probably a decade at this point, and never seen that behaviour.
Well, you can at least run "freebsd-update IDS" on this system to verify the base system, "pkg check -s -a" would check the integrity of files installed via pkg also.
It will only take a few min..