Ubutnu allows ssh connection to log in with root and password

1. Modify sshd_config

Modify /etc/ssh/sshd_configthe file, find it #Authentication, and PermitRootLoginmodify the parameters to yes. If the PermitRootLogin parameter is commented, remove the comment symbol (#) from the first line. change intoPermitRootLogin yes

sudo nano /etc/ssh/sshd_config

2. Set root password

sudo passwd root

3. Restart the SSH service

sudo service ssh restart

Finally, you can connect remotely via ssh ~

Guess you like

Origin blog.csdn.net/a924282761/article/details/132650103