SSH directly uses Root to connect to ubuntu

Set the password for the root account

$ sudo passwd root

 Enter your current user's password

 Enter the password of your desired root user

 confirm password

Modify ssh configuration

$ sudo vi /etc/ssh/sshd_config

Find the PermitRootLogin no line and change it to PermitRootLogin yes

 

restart ssh

$ sudo service ssh restart

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326456660&siteId=291194637