Disabling Root SSH Login
So I followed this guide to disable root login on ssh
Security Tip: Disable Root SSH Login on Linux - How-To Geek
But it seems as if it didnt work. I am still able to log in under my main account and type sudo su and it goes straight to root with no additional password.
The article led me to believe I would have to log in with one password and type another password to do root actions.
How do I achieve this?
What's your mail account ? - login to your main account before doing "su"
and post its results here.
Also check whether /etc/sudoers file has entry for your main account?
If you want to disable root ssh login - Edit the file /etc/ssh/sshd_config
make sure it as an entry like
id gives this
and the only thing listed in sudoers is root
uid=1000(weazol) gid=1000(weazol) groups=1000(weazol),4(adm),20(dialout),24(cdrom),46(plugdev),111(lpadmin),119(admin),122(sambashare)
also I have the config file edited just like you mentioned
Now try restart "sshd" and try to ssh as root.
Is it still allowing you to ssh as root user?
no i cannot log in under the name "root"
But if I log in using "weazol" I can type the exact same password to have root access.
I want it to be were if someone bruteforces my password they still have another to go through to get root.
EDIT: Never mind I am a noob. They both had the same password. I got it now, Thanks.