If you have ssh service running, make sure you disable the root login. If you didnt disable the ssh root login, you are prone to brute force attack and once it breaks in, your server is owned. To prevent this happen, you can disable the root login thru the ssh. No worry, it’s not a very difficult task, just edit a line of configuration and restart the service then you are done.
To disable ssh root login, follow the steps below:-
Advertisements
- login to your linux with root privilege
- Now edit the sshd_config file. Normally it’s located at /etc/ssh directory
vi /etc/ssh/sshd_config
- Now look for the line below
#PermitRootLogin yes
- and change to below then save:-
PermitRootLogin no
* Remove the # and change the value to no
- Now restart your sshd service using the command below:-
service sshd restart
- Done! you has just disable your ssh root login!
Related posts:
How to reload .bash_profile in Linux or Mac?
WordPress Dev: How to send html email using wp_mail()?
Mod Security - Open source Web Application Firewall
Composer: PHP Fatal error: Allowed memory size of ... exhausted...
CPAN Error: make test had returned bad status, won't install without force
MySQL: How to add column to existing table
How to re-arrange account order in Thunderbird
Free image editor for Mac OS X / XP / Vista / Linux
Share this with your friends:-