document/文档/linux/root.md
2024-07-11 22:22:50 +08:00

13 lines
238 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

###
```sh
sudo nano /etc/ssh/sshd_config
#找到并修改以下行:
PermitRootLogin prohibit-password
#改为:
PermitRootLogin yes
# 重启SSH服务
sudo systemctl restart sshd
# 为root用户设置密码
sudo passwd root
```