After the previous "Modify SSH port" set our Linux VPS Security performance, continue to complete other methods today. Whether you want to try to invade our website is software scanning, or artificial operation of the port scan Weak command is a method, the second is to guess Root rights account. In general, we use the account login directly with root login. If we disable the root account and add an account that we know, the VPS Security Portal is basically complete. At least guessing the password thing is not done.
The first step, we first SSH landing VPS.
Useradd Laozuo #添加用户名
passwd Laozuo #为laozuo用户名设置密码
Then you need to enter the password two times, you will see as shown in the figure.
The second step is that we need to set the prohibit root user, which requires compiling the file. We can operate through the VI command, but also through the WINSCP and other FTP software to download file editing.
Vi/etc/ssh/sshd_config
Like the previous setup port, compile the Sshd_config file and change the Yes to No in the Permitrootlogin
Save exit, restart Ssh:service sshd restart (centos)/service ssh restart (Debian)
The third step is to raise the right. Log in with our newly added username and then su root to give the new user the highest privileges of the root user.
The above is the old left to share how to prohibit root permissions, there is a need for friends to refer to. It is recommended to test the machine first and then as a formal trial.