新创建的腾讯云ubuntu系统服务器,默认的登陆用户名为ubuntu,那很多用户都想使用超级管理员root用户来操作自己的服务器,但是root用户默认是被禁止登陆的,该如何启用root用户呢?操作方法如下:
1、使用ubuntu用户登陆到系统中;

2、编辑/etc/ssh/sshd_config文件;
sudo vim /etc/ssh/sshd_config
找到配置参数:PermitRootLogin
将该参数后面的值修改为yes即可;

按“esc键” :wq 回车, 保存退出;
3、给root用户设置密码;
sudo passwd root
输入两遍密码;
(给root用户设置了密码后,就已经可以使用root用户从vnc登陆到系统中了)

4、重启ssh服务
sudo systemctl restart ssh
然后测试用root用户远程登陆即可;
