From 428707c086886251a919cb3525f0ce0ed4ead2c2 Mon Sep 17 00:00:00 2001 From: Pieter Lange Date: Tue, 23 Jan 2018 22:29:45 +0100 Subject: [PATCH] Properly concatenate public key so each key is separated by newline --- entrypoint | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/entrypoint b/entrypoint index bff3652..5b44861 100755 --- a/entrypoint +++ b/entrypoint @@ -88,7 +88,9 @@ function createUser() { # Add SSH keys to authorized_keys with valid permissions if [ -d /home/$user/.ssh/keys ]; then - cat /home/$user/.ssh/keys/* >> /home/$user/.ssh/authorized_keys + for publickey in /home/$user/.ssh/keys/*; do + cat $publickey >> /home/$user/.ssh/authorized_keys + done chown $uid /home/$user/.ssh/authorized_keys chmod 600 /home/$user/.ssh/authorized_keys fi