Set up a new server to allow root user login

Here's how to do it:

1. Log in as ubuntu user

2. Run sudo passwd root 

Ask for password and confirm password

3.sudo vi /etc/ssh/sshd_config modify ssh configuration

Find #PermitRootLogin prohibit-password

Change to PermitRootLogin yes

press esc

:wq!Save and exit

4. Restart the ssh service

sudo service ssh restart
-----------------------------------
 

Guess you like

Origin blog.csdn.net/fzy18757569631/article/details/132809158