banner
欢迎观看

Ubuntu允许Root用户登录

Scroll down

本文作者:丁辉

Ubuntu允许Root用户登录

  1. 配置Root密码

    1
    sudo passwd root
  2. 修改 ssh 配置

    1
    sudo vi /etc/ssh/sshd_config
  3. 修改如下参数为 yes

    1
    2
    3
    4
    5
    6
    7
    8
    # 允许 root 登录,但仅限于密钥方式。确保这是 'prohibit-password' 或 'without-password'
    PermitRootLogin yes

    # 确保公钥认证是开启的
    PubkeyAuthentication yes

    # 密码认证是关闭的(增加安全性)
    # PasswordAuthentication no
  4. 重启 SSH 服务

    1
    sudo service ssh restart

要是这篇文章为您解了惑、带来了帮助,不妨用小小的打赏来支持下我的创作吧,您的鼓励就是我持续分享的最大动力哦,感谢您啦!

其他文章
cover
华为服务器设置风扇转速
  • 70/01/01
  • 00:00
  • Linux-Docs
目录导航 置顶
  1. 1. Ubuntu允许Root用户登录
请输入关键词进行搜索