when I login by the root user, there is a warning: “Not on System Console, root login reject”

the solution is

Simply open /etc/default/login and comment out the line that starts with CONSOLE like the following.

CONSOLE=/dev/console

and change it

#CONSOLE=/dev/console