Skip to content

Commit 7521361

Browse files
author
Kirill Müller
committed
bugfix
1 parent dcaf6d6 commit 7521361

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

set_root_pw.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,8 @@ echo "========================================================================"
2525
if [ -n "${ROOT_KEY}" ]; then
2626
echo "=> Adding an SSH key for the root user"
2727
mkdir -p /root/.ssh
28-
echo ${ROOT_KEY} > authorized_keys
28+
chmod go-rwx /root/.ssh
29+
echo "${ROOT_KEY}" > /root/.ssh/authorized_keys
30+
chmod go-rw /root/.ssh/authorized_keys
31+
cat /root/.ssh/authorized_keys
2932
fi

0 commit comments

Comments
 (0)