修改 root 密码
$ sudo passwd root
[sudo] password for linuxconfig:
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
允许 root 登录
$ sudo sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
重启 ssh 服务
$ sudo service ssh restart