Can't login as root via ssh
I already set "PermitRootLogin" back to yes and not only restarted the service but the entire system, yet I still can't login as root with password or keys. Is there any other config option that rtinst changes that could be causing this issue?
Thanks in Advance 👌
You may want to add either a command or a simple part added to the root login section telling people to either add the root group to the AddGroups or simply comment it out. In my case, this was what was preventing the login.
@Ninsto Can you please explain a bit more what was the issue and how you fixed it?
The install script automatically enforces what I think is it's own user system. It adds and changes 2 lines in /etc/ssh/sshd_config
Changes:
PermitRootLogin no - It overrides your current PermitRootLogin option with no. (self-explanatory)
AllowGroups sudo sshuser This line it adds itself, this forces ssh to only allow user logins from users from the groups 'sudo' and 'sshuser' therefore not allowing you to not login to any users not added during their installation or that's a sudo user.
PermitRootLogin alone does not allow you to login after being changed to yes due to not being in any of the aforementioned groups so you have to either comment out or cut the line from the config file. This obviously would not be an issue, but I primarily use root because I don't have my server facing the outside network and also use public keys.
P.S. It's very annoying that this was completely overlooked in this part of the documentation making it harder to find. I'd be very happy if they added a sed command to remove or comment out the AllowGroups part. I understand there reasoning for this but they shouldn't automatically assume their users are dumb and don't know common linux practice.
sudo sed -i '/AllowGroups/d' /etc/ssh/sshd_config