设置root密码 users1@users1-PC:~$ sudo passwd root 新密码: Retype new password: passwd:已成功更新密码 users1@users1-PC:~$ su - root 请输入密码 Password: 验证成功 root@users1-PC:~# 配置ssh使用root用户登陆 vim /etc/ssh/sshd_config #添加允许root登陆配置项 PermitRootLogin yes 重启sshd服务 systemctl restart sshd