Ubuntu 20.04 启用root 用户ssh 登陆系统

  1. 为root 账户设置密码

    sudo passwd root

  2. 编辑/etc/ssh/sshd_config 文件

    更改PermitRootLogin 为

    PermitRootLogin yes