CentOS 7 disables root permissions by default. You can enable it by following the following steps: Temporarily enable it: Enter "su root" in the terminal and enter the root password. Permanently enabled: Edit "/etc/ssh/sshd_config", change "PermitRootLogin no" to "yes", and restart the SSH service.
How to enable Root permissions in CentOS 7
CentOS 7 disables root permissions by default for security reasons. If you need to temporarily or permanently enable root privileges, you can use the following steps:
Temporarily enable root privileges
<code>su root</code>
#. exit
command to exit with root privileges. Permanently enable root permissions
/etc/ssh/sshd_config
File:<code>vi /etc/ssh/sshd_config</code>
<code>PermitRootLogin no</code>
no
to yes
. <code>systemctl restart sshd</code>
You can now connect to the system via SSH using the root username and password. NOTE: For security reasons, it is highly recommended that you enable root privileges only when needed, and that root privileges should be disabled when completed.
The above is the detailed content of How to enable root permissions in centos7. For more information, please follow other related articles on the PHP Chinese website!