jasonnix wrote: ↑2024-02-26 09:42
1- I can't get your point. When "PermitRootLogin no" is disable, then I should be able to log in with the root account. Is it otherwise?
The default for PermitRootLogin is "prohibit-password", at least in the stable debian version.
If you have something like
in your sshd_config, it doesn't mean that the option is "disabled", it just means that it's a comment which doesn't mean or do anything, i.e. the option PermitRootLogin is, and continues to be, the default setting.
If you want to actually change that, then you have to remove the "#" to make it actually do something.
This is what @fabien wrote already in the first reply, but it seems that you didn't quite understand, so hopefully writing it again, differently, will make it more understandable?
Alternatively: tell us what you actually need/want, i.e. do you want to be able to log in as root with password, or only with private/public key (that is the default) or not at all?