fix(armbian-firstlogin): use PRESET_USER_KEY instead of PRESET_ROOT_KEY for user SSH key

This commit is contained in:
Vasco Guita 2025-08-06 12:19:59 +00:00 committed by leggewie
parent ca4dc8085a
commit ef28357561
1 changed files with 1 additions and 1 deletions

View File

@ -587,7 +587,7 @@ add_user() {
# download and add SSH key if defined
if [[ -n "${PRESET_USER_KEY}" ]]; then
mkdir -p /home/"$RealUserName"/.ssh/
curl --retry 5 --connect-timeout 3 "${PRESET_ROOT_KEY}" > /home/"$RealUserName"/.ssh/authorized_keys 2> /dev/null
curl --retry 5 --connect-timeout 3 "${PRESET_USER_KEY}" > /home/"$RealUserName"/.ssh/authorized_keys 2> /dev/null
chown -R "$RealUserName":"$RealUserName" /home/"$RealUserName"/.ssh/
fi