finlshell: ubuntu cannot connect with root user (solved)

First of all, the solution this time is that even if the ping between addresses can be achieved, but it keeps prompting to enter the password and reports an error, it still fails to connect, and ordinary users can connect, but root users cannot connect.

Solution

1. First change the bridge connection to a NAT connection, if it is a NAT connection, there is no need to change it

  241a889b69c614a919436251b48ebccf4.png

It will take effect after restarting!


2. Check to see if the root user login permission is restricted

 

 cd /etc/ssh/

 vim sshd_config

See if there is in the file

 If PermitRootLogin yes, uncomment it, otherwise add another line

After editing this file, remember to restart the ssh service.

 d459cb2b2b5348f18e05ea64e05d9d33.png


 

The most important moment has come


If you still can't connect to the root user, then this is the problem!

Please take a closer look

f5f4302131934f9ab480a2407386273a.png

Even if your password is correct, it will still look like this 

 26252d77e763435da095a5ab93455c40.png

 No matter how many times you enter the password, you will not be able to connect. Do you have a dead heart hahahaha

This problem is also a headache for bloggers

The solution to this problem is very simple. It turned out that when we started the virtual machine

Just set a password for ordinary users, but not for root users, so of course you can’t connect when you connect, and the password is wrong.

first step

Excuting an order

sudo passwd root

enter password

 4a8ec2547904425eacd49f18a5dbabef.png

 

 The second step: there is no second step. After the modification is successful, you can connect with the root user.

Useful Like, Like, Like, Like, Like, Like, Like, Like, Like, Like, Like, Like, Like, Like, Like, Like, Like!

 

 

Guess you like

Origin blog.csdn.net/Qhx20040819/article/details/131748479