How to use console window on instance server without root password?

#1

Hello everybody,

I am new on virtual instance and all these stuffs.
So my question will be maybe too simple, sorry about that.

I have my instance server. I choose a Debian buster image. The root user has no password because it is better for security issues. Ok.
I can connect to by ssh with my ssh key. Ok.
I set my /etc/ssh/sshd_config file with PermitRootLogin prohibit-password for security issues. Ok.

But if for any reason the ssh service is down or if my server lost network. How to fix the problem ?
If I want to use the console window on my instance server, I can’t because root user has no password.
It is normal, I understand that.
But with the consideration to set root user with no password, what is the solution without reboot the server ?

Even if I accept to reboot the server (not ideal on production server) to use recovery mode, with my scaleway instance the recovery mode is blocked to ‘Booting in blind modeBooting in blind mode’. I don’t understand why.

I think I lack some knowledge to understand the problem. Could you please help me ?
Thank for your informations.

#2

Hello,

You can connect to your server from the serial console if you set a password for the root user using the passwd command once you are logged in via SSH. Make sure to choose a strong and secure password for the root server. Once the password is set you will be able to connect to your server using the serial console.

Benedikt

#3

Allright,

So like I thought, to use serial console I need to set a password to root.

Thanks for your return.