<aside> 📌 X: @st7evechou | 频道: @st77eve | 群组: @st7evee
</aside>
1. 设置 root 密码
sudo -i 进入 Rootpasswd 设置新密码(输入时不会显示)2. 开启 SSH 权限
CentOS / Debian:
sed -i 's/PermitRootLogin no/PermitRootLogin yes/g' /etc/ssh/sshd_config
sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config
Ubuntu:
sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/g' /etc/ssh/sshd_config
sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config
3. 重启
reboot