ubuntu14.10 ssh allows root user to log in remotely

 Change root password

sudo passwd root

2. Log in with another account and modify /etc/ssh/sshd_config via sudo nano:

xxx@ubuntu14:~$ su - root
Password:
root@ubuntu14:~# vi /etc/ssh/sshd_config

3. Comment out #PermitRootLogin without-password and add PermitRootLogin ye

# Authentication:
LoginGraceTime 120
#PermitRootLogin without-password
PermitRootLogin yes
StrictModes yes

4. Restart the ssh service

root@ubuntu14:~# sudo service ssh restart
ssh stop/waiting
ssh start/running, process 1499
root@ubuntu14:~#

Guess you like

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