fix: create .ssh dir before writing authorized_keys
This commit is contained in:
@@ -6,6 +6,8 @@ ssh-keygen -A
|
||||
|
||||
# Write authorized keys from env if provided
|
||||
if [ -n "$SSH_AUTHORIZED_KEYS" ]; then
|
||||
mkdir -p /root/.ssh
|
||||
chmod 700 /root/.ssh
|
||||
echo "$SSH_AUTHORIZED_KEYS" > /root/.ssh/authorized_keys
|
||||
chmod 600 /root/.ssh/authorized_keys
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user