--首先
#sudo passwd root
输入两次密码 自己设置root的密码 如:123456
出现--passwd: password updated successfully
--然后
#sudo vi /etc/ssh/sshd_config
找到 #Authentication,
将 PermitRootLogin 参数修改为 yes。(位置大概 32行)
(如果)
#PermitRootLogin 去掉首位的注释符号#
--输入
#:wq 保存
--重启ssh服务:#systemctl restart ssh
--重启ubuntu:#reboot
退出 SSH登录帐号
使用root用户登录
--OK 终了
---------------------------------------------------------------
步骤基本能通用版本