diff --git a/ssh/config.json b/ssh/config.json index 0eb12e5..f8ab88d 100644 --- a/ssh/config.json +++ b/ssh/config.json @@ -1,6 +1,6 @@ { "name": "SSH server", - "version": "0.4", + "version": "0.5", "slug": "ssh", "description": "Connect to your server over SSH", "startup": "before", diff --git a/ssh/run.sh b/ssh/run.sh index 7ee6dcb..7cb5f42 100644 --- a/ssh/run.sh +++ b/ssh/run.sh @@ -12,9 +12,9 @@ sed -i s/#PasswordAuthentication.*/PasswordAuthentication\ no/ /etc/ssh/sshd_con # Generate authorized_keys file mkdir -p ~/.ssh -for line in $AUTHORIZED_KEYS; do +while read -r line; do echo "$line" >> ~/.ssh/authorized_keys -done +done <<< "$AUTHORIZED_KEYS" chmod 600 ~/.ssh/authorized_keys # Generate host keys