# Locked out from VPS



## beastdev (Apr 7, 2022)

Hello guys,

I have a little problem.
Forgot the password from my virtual server, where im running fbsd 12.1. Unfortunatelly I only have root user, when booting into single user mode, there is also password required.
Any idea how to bypass that?

Thanks.


----------



## SirDice (Apr 7, 2022)

beastdev said:


> Any idea how to bypass that?


Boot an installer or some other FreeBSD boot (mfsbsd for example). Mount your own disk and use a chroot to change the password. Assuming the disk isn't encrypted because if it is you are forever locked out.


----------



## beastdev (Apr 7, 2022)

SirDice said:


> Boot an installer or some other FreeBSD boot (mfsbsd for example). Mount your own disk and use a chroot to change the password. Assuming the disk isn't encrypted because if it is you are forever locked out.


Thanks, I will try.


----------



## SirDice (Apr 7, 2022)

After you regained control, make sure to update it. FreeBSD 12.1 is end-of-life, upgrade to 12.3.









						Unsupported FreeBSD Releases
					

FreeBSD is an operating system used to power modern servers, desktops, and embedded platforms.




					www.freebsd.org


----------



## sko (Apr 7, 2022)

and while we're at it: don't use password-based ssh logins.

Especially on internet-facing systems.

ESPECIALLY for root.


----------



## SirDice (Apr 7, 2022)

Root logins over ssh are disabled by default. But yeah, make sure that's still turned off.


----------



## sko (Apr 7, 2022)

true, but OP seems to have re-enabled it instead of going the safer (and much more comfortable) way of using ssh-keys...

I don't know why not all VPS providers make ssh-keys mandatory on instance creation. At least digitalocean, vultr and netcup have had this requirement in place for several years now...


----------

