From 651dec0914b2ab37f746b95e02f8c46a4f5e8243 Mon Sep 17 00:00:00 2001 From: Lucas Liu Date: Fri, 22 Jul 2022 04:12:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E7=B1=B3=E8=AE=BE=E5=A4=87=E8=BD=AF?= =?UTF-8?q?=E5=9B=BA=E5=8C=96SSH=E6=97=B6=E5=A4=87=E4=BB=BD=E8=BF=98?= =?UTF-8?q?=E5=8E=9Fauthorized=5Fkeys?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/clash.sh | 1 + scripts/start.sh | 1 + 2 files changed, 2 insertions(+) diff --git a/scripts/clash.sh b/scripts/clash.sh index ad99b87..5ccd73f 100644 --- a/scripts/clash.sh +++ b/scripts/clash.sh @@ -1321,6 +1321,7 @@ tools(){ read -p "请输入需要还原的SSH密码(不影响当前密码,回车可跳过) > " mi_autoSSH_pwd mi_autoSSH=已启用 cp -f /etc/dropbear/dropbear_rsa_host_key $clashdir/dropbear_rsa_host_key 2>/dev/null + cp -f /etc/dropbear/authorized_keys $clashdir/authorized_keys 2>/dev/null echo -e "\033[32m设置成功!\033[0m" sleep 1 else diff --git a/scripts/start.sh b/scripts/start.sh index a683e33..50f4ad4 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -133,6 +133,7 @@ autoSSH(){ } #备份还原SSH秘钥 [ -f $clashdir/dropbear_rsa_host_key ] && ln -sf $clashdir/dropbear_rsa_host_key /etc/dropbear/dropbear_rsa_host_key + [ -f $clashdir/authorized_keys ] && ln -sf $clashdir/authorized_keys /etc/dropbear/authorized_keys } host_lan(){ [ -n "$(echo $host | grep -oE "([0-9]{1,3}[\.]){3}[0-9]{1,3}" )" ] && host_lan="$(echo $host | grep -oE "([0-9]{1,3}[\.]){3}")0/24"