腾讯云 ubuntu 账号更改为 root 登录的方法 | 珊瑚贝

需求分析

有需求才有动力! 腾讯云有个比较坑的地方,Ubuntu 的机子必须要用 ubuntu 账号来登录,给我的统一管理带来了很大的麻烦。 在这里我想把它的账号名称改成 root 来统一登录。

步骤

首先用 ubuntu 账号登录主机。 然后输入

1
sudo passwd root

在这里会首先提示你输入 ubuntu 用户的账号,然后输入新设置的 root 用户的账号。在这里一共要输入三次,不过建议 root 密码和 ubuntu 密码都一样啦。 QQ20161031-1@2x 然后修改 /etc/ssh/sshd_config

1
sudo vi /etc/ssh/sshd_config

把 PermitRootLogin 修改为 yes QQ20161031-2@2x wq 保存 接下来你就可以使用 root 登录了 当然你还可以根据下面这篇文章配置免密码登录。 免密码登录

结语

本文章介绍了腾讯云 Ubuntu 系列主机配置 root 登录的方法,希望对大家有帮助。

来源:https://cuiqingcai.com/3296.html

微信公众号
手机浏览(小程序)

Warning: get_headers(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(): Failed to enable crypto in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(https://static.shanhubei.com/qrcode/qrcode_viewid_11737.jpg): failed to open stream: operation failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57
0
分享到:
没有账号? 忘记密码?