From a408db2cc555215cd24a3f58ae9008d52c389566 Mon Sep 17 00:00:00 2001 From: Olia Lisa Date: Sun, 12 Jul 2026 21:51:05 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=E5=88=9B=E5=BB=BAssh?= =?UTF-8?q?=E5=85=AC=E9=92=A5=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- files/etc/uci-defaults/99-sshd-root-login | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/files/etc/uci-defaults/99-sshd-root-login b/files/etc/uci-defaults/99-sshd-root-login index 07bcfb8..92b1fe2 100755 --- a/files/etc/uci-defaults/99-sshd-root-login +++ b/files/etc/uci-defaults/99-sshd-root-login @@ -20,8 +20,13 @@ if [ -f "$SSHD_CONF" ]; then else echo "PasswordAuthentication yes" >> "$SSHD_CONF" fi + + # 创建root用户ssh公钥目录和文件 + mkdir -p /root/.ssh + touch /root/.ssh/authorized_keys fi + # 重启 OpenSSH 服务(如果已安装) if [ -x /etc/init.d/sshd ]; then /etc/init.d/sshd enable