Switch to the root user:
sudo -i
Edit the configuration file:
vim /etc/ssh/sshd_config
Modify the parameter:
Change "no" after PermitRootLogin to "yes"
Modify the parameter:
Change "no" after PasswordAuthentication to "yes"
Set the root password:
passwd
Restart the ssh service:
systemctl restart ssh
Note: X=delete the # sign, W=move the cursor to the next word, DW=delete the word after the cursor, A=enter edit mode, esc=exit edit mode, slash "/" + string=find
After editing, enter :wq
to save and exit, then restart the ssh service