Home >Operation and Maintenance >CentOS >How to enable root remote login in centos system

How to enable root remote login in centos system

王林
王林Original
2020-03-23 16:53:015277browse

How to enable root remote login in centos system

By default, CentOS does not allow root remote login, so logging in using terminal tools such as SFTP will be denied. Remote access can be enabled through simple configuration.

The specific method is as follows:

1. Check whether ssh is installed

By default, ssh has been installed after the CentOS installation is completed. You can check it through the following command:

$ ssh -V

(Recommended tutorial: centos usage tutorial)

2. Configure sshd_config

Execution:

$ vi /etc/ssh/sshd_config

Change the #PermitRootLogin yes line in front of the configuration Remove the # sign.

3. Restart the ssh service

$ service sshd restart

Local terminal command line to log in to the remote server:

ssh root:188.188.188.188

Recommended related video tutorials: linux video tutorial

The above is the detailed content of How to enable root remote login in centos system. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn