CentOS7.3 study notes summary (XII)

1,  the production environment without root management

Do not use in a production environment root management linux system, the ordinary user login, via sudo authorization management. When we execute sudo , the system will automatically look for the / etc / sudoers file, determine whether the user has permission to run sudo to confirm the user has permission to perform sudo, allowing the user to enter their password to confirm the amount, the password confirmation is successful, then began to run sudo subsequent commands.

2,  disable the root account remote connections

Edit the configuration file / etc / SSH / sshd_config ,

image.png 

The #PermitRootLogin yes revised to PermitRootLogin no

Execute commands take effect:

systemctl restart sshd

So with the root account login, not land.

If you use the root account, you need to use ordinary user login, and then switch to the root account. This will try to ensure that root security accounts.

3,  regularly updated server time, to ensure that time and Internet time synchronization

Command: crontab -e

Joined:

*/5 * * * * /usr/sbin/ntpdate time.windows.com >/dev/null 2>&1 

Prerequisite: The system is installed to install ntp software.


Guess you like

Origin blog.51cto.com/6300167/2484069