Raspberry Pi 4:PermitRootLogin 设置为“是”,但无法使用 root 登录

Raspberry Pi 4:PermitRootLogin 设置为“是”,但无法使用 root 登录

我刚刚在我的 Raspberry Pi 4 上安装了适用于 Raspberry 19.10 的 Ubuntu。我设置PermitRootLoginyes,但无法直接使用 root 登录。有什么想法吗?

答案1

我只有 Pi 3(现在装有 Raspbian 10)和一些其他装有 Ubuntu 18 的机器。

但我刚刚测试了你写的内容。一切都按预期运行。我可以用 root 帐户登录。所以……mb 这会有所帮助。

您想使用哪种类型的身份验证(公钥还是密码等)?只需设置密钥(和目录的权限)或密码。在 中启用PubkeyAuthentication或。设置(或无密码)并重新加载守护进程。PasswordAuthenticationsshd_configPermitRootLoginyesssh

如果使用,请不要忘记检查pampam.d目录 - ssh,登录)生态系统。也可能存在有效限制。

然后尝试再次登录;)

如果这没有帮助,请检查日志(也/etc/securetty)。

答案2

确保您 /etc/ssh/sshd_config没有 改变/etc/ssh/ssh_config

相关内容