以下内容源于网络资源的学习与整理,如有侵权请告知删除。
1、在虚拟机ubuntu中以root用户登录。
2、修改/etc/ssh/sshd_config文件内容,将“PermitRootLogin without-password”注释掉,添加“PermitRootLogin yes”。
# Authentication:
LoginGraceTime 120
#PermitRootLogin without-password
PermitRootLogin yes
StrictModes yes
3、重启ssh服务。
root@ubuntu14:~# sudo service ssh restart
ssh stop/waiting
ssh start/running, process 1499
root@ubuntu14:~#