Problem:
After installing Ubuntu on the virtual machine, when connecting remotely through ordinary ssh, I have clearly entered the correct root user name and password but I keep being prompted to enter the password. Unable to log in remotely, but normal users are fine.
(Recommended video tutorial: linux video tutorial)
Solution:
1. Confirm that the ssh service has been installed and the connection is successful through an ordinary user;
2. Confirm whether the ssh configuration has special settings for root, modify the /etc/ssh/sshd_config file
Find PermitRootLogin without-password
Change without-password to yes ;
3. Restart the ssh service /etc/init.d/ssh restart;
4. Use ssh to connect again. This time there is no prompt and the connection is successful.
Related recommendations: linux tutorial
The above is the detailed content of Root user cannot connect via ssh under linux. For more information, please follow other related articles on the PHP Chinese website!