diff --git a/misc/alpine-install.func b/misc/alpine-install.func index b7381947a..405fc2149 100644 --- a/misc/alpine-install.func +++ b/misc/alpine-install.func @@ -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 }