If you lost the FreeBSD root password, the usual path is single-user mode via console (provider VNC/IPMI/KVM), not SSH.
Steps
Reboot and at the loader menu choose single-user boot (or press the key to edit and add single-user options for your version).
When you get a shell, remount root read-write:
mount -u /mount -aChange the root password:
passwd rootExit and reboot to multi-user:
exitreboot
Tips
- After recovery, set SSH keys and disable root password logins when possible.
- On cloud VPS use the panel console — without console you cannot enter single-user.
ext step
FreeBSD or Linux with console access: Deploy your Cloud VPS.