1 2 3 4 5 |
By disabling direct root logins on ssh helps you keep your server safer. Also you can manage to push ssh version 2. 1. <a title="How to setup SSH – Install SSH server and client" href="https://totallynoob.comhow-to-setup-ssh-install-ssh-server-and-client/" target="_blank">SSH</a> into your server and type <kbd>sudo su</kbd>to gain root previleges 2. [crayon-674cb89ab3470344124453 lang="bash" ]nano /etc/ssh/sshd_config |
3. In nano type Ctrl+w to search for “protocol 2” and hit Enter
4. Uncomment and change it to look like Protocol 2
5.find the line
PermitRootLogin yes
6. Uncomment it (if it’s commented) and make it look like PermitRootLogin no
7. Save the file and quit ( Ctrl+x -> y -> Enter)
8. Restart SSH by typing
1 |
service ssh restart |
Now whoever log into the system must use “su” to escalate privileges.
thnx for reading,
@specktator[/crayon]
1 thought on “Disable Direct Root Logins”