mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-02-01 17:31:49 +00:00
fix: actually add the given root SSH key to the container (#1502)
This commit is contained in:
parent
7614034784
commit
2aed45fa61
@ -827,6 +827,7 @@ build_container() {
|
|||||||
export PASSWORD="$PW"
|
export PASSWORD="$PW"
|
||||||
export VERBOSE="$VERB"
|
export VERBOSE="$VERB"
|
||||||
export SSH_ROOT="${SSH}"
|
export SSH_ROOT="${SSH}"
|
||||||
|
export SSH_AUTHORIZED_KEY
|
||||||
export CTID="$CT_ID"
|
export CTID="$CT_ID"
|
||||||
export CTTYPE="$CT_TYPE"
|
export CTTYPE="$CT_TYPE"
|
||||||
export PCT_OSTYPE="$var_os"
|
export PCT_OSTYPE="$var_os"
|
||||||
|
@ -255,4 +255,11 @@ EOF
|
|||||||
fi
|
fi
|
||||||
echo "bash -c \"\$(wget -qLO - https://github.com/community-scripts/ProxmoxVE/raw/main/ct/${app}.sh)\"" >/usr/bin/update
|
echo "bash -c \"\$(wget -qLO - https://github.com/community-scripts/ProxmoxVE/raw/main/ct/${app}.sh)\"" >/usr/bin/update
|
||||||
chmod +x /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
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user