允许root用户登录ssh(Ubuntu)

  1. 编辑ssh的配置文件,命令:vim /etc/ssh/sshd_config

    允许root用户登录ssh(Ubuntu)

  2. 在Authentication部分,注释掉“PermitRootLogin without-password”
  3. 在Authentication部分,添加“PermitRootLogin yes”
  4. 重新启动ssh服务,命令:sudo service ssh restart