fix: SSH authorized keys not added in Alpine install script (#6316)

This commit is contained in:
九条涼果 2025-07-29 01:44:52 +08:00 committed by GitHub
parent 4fb5ea4ec2
commit 0955ec4b7f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -152,4 +152,11 @@ EOF
echo "bash -c \"\$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/${app}.sh)\"" >/usr/bin/update
chmod +x /usr/bin/update
if [[ -n "${SSH_AUTHORIZED_KEY}" ]]; then
mkdir -p /root/.ssh
echo "${SSH_AUTHORIZED_KEY}" >/root/.ssh/authorized_keys
chmod 700 /root/.ssh
chmod 600 /root/.ssh/authorized_keys
fi
}