ubuntu 系统如何使用root用户登陆实例
环境描述
腾讯云:轻量应用服务器
Ubuntu 18
问题描述
Ubuntu实例默认禁用root用户通过密码SSH远程登录

解决方法
参考教程
Ubuntu 系统的默认用户名是 ubuntu,并在安装过程中默认不设置 root 帐户和密码。您如有需要,可在设置中开启允许 root 用户登录。
- 设置root密码
sudo passwd root

2. 配置sshd_config配置文件
sudo vi /etc/ssh/sshd_config
- 找到 #Authentication,将 PermitRootLogin 参数修改为 yes

- 将 PasswordAuthentication 参数修改为 yes

- 按 Esc,输入 :wq,保存文件并返回
- 重启 ssh 服务
sudo service ssh restart


浙公网安备 33010602011771号