About the solution to the root user login error after installing ssh under deepin

I just came into contact with deepin recently. I thought, wow, in addition to mac, there is such a beautiful non-win system, and the first Linux I tested has a high tolerance, which is very suitable for people like me who like to toss, so I downloaded the deepin15 version And it was successfully installed as a virtual machine. After installation, it was found that there was no root user? Well, after the basic Linux distribution is installed, add a password to the root user:

<p>sudo passwd root</p>

First, you will be prompted to enter the password of the current user, and then you will be asked to enter the password of the root user twice in a row. After completion:

his -

Enter the root password you just set to log in to the root user.

Next, install ssh:

apt-get install ssh

After installation, use xshell to connect to deepin. After all, the graphical interface is still relatively resource-intensive. Just use shell for normal deployment. After setting, root connection is successful? It is impossible, jumping out of the prompt box, saying that the ssh server refuses to connect, suddenly remembered that this happened when I installed Ubuntu before, so I thought that there might be a problem with the configuration file, okay, let's modify the ssh configuration file again :

vi /etc/ssh/sshd_config

find below

 

Modify the content in the red box to the following:

After the modification is successful, restart the ssh service:

service ssh restart

Then we can happily use xshell to connect remotely and log in to the deepin system with the root user.

 

ps: Pay attention to a problem here, do not remove the # of #Authentication, if removed, there will be a big problem, after removing it, when we try to restart the ssh service, an error will be reported

Job for ssh.service failed because the control process exited with error code

This error is caused by modifying the configuration file, and it is tragic that not to mention the root user, even your own personal account cannot be connected through xshell, because the ssh service cannot be started at all, the solution is to add Authentication in front of #

pps: It is strongly recommended that any behavior of modifying the configuration file should be backed up before modification, and then modified.




Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324973983&siteId=291194637