Skip to content

Commit 208936b

Browse files
authored
Make sure authorized_keys is ending with EOL when adding a SSH Key
1 parent d0f8d56 commit 208936b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

bin/v-add-user-ssh-key

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ if [ ! $? -eq 0 ]; then
5151
exit
5252
fi
5353
rm "$TEMP"
54+
# make sure authorized_keys is ending with EOL
55+
sed -i '$a\' "${AUTHKEY_FILE}"
56+
5457
#append key to file
5558
echo "$key" >> "$AUTHKEY_FILE"
5659

0 commit comments

Comments
 (0)