Disable remote root login?

Hi

Thanks so much for your work. Very impressive indeed.

The one thing that concerns me is the default use of the root account.

Is there a fairly straightforward way to disable this? Or is DietPi heavily reliant on the root user in order to make all it’s easy config scripts run smoothly.

Even with key based remote SSH login, I still don’t feel comfortable allowing root login from the outside world.

Thanks

Hi,

If using OpenSSH Server, you can disable remote root login with:

nano /etc/ssh/sshd_config

Change

PermitRootLogin yes

to

PermitRootLogin no
1 Like