We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 79429dc commit d0f8d56Copy full SHA for d0f8d56
1 file changed
bin/v-add-user-sftp-key
@@ -62,6 +62,9 @@ if [ ! -f "${AUTHKEY_FILE}" ] || [ "$new_pubkey" = true ]; then
62
sed -i "/ \[${user}\]filemanager\.ssh\.key\$/d" "${AUTHKEY_FILE}"
63
fi
64
65
+ # make sure authorized_keys is ending with EOL
66
+ sed -i '$a\' "${AUTHKEY_FILE}"
67
+
68
echo "from=\"127.0.0.1\",command=\"internal-sftp\",restrict ${pubkey_str} TS:${now} ${pubkey_desc}" >> "${AUTHKEY_FILE}"
69
70
0 commit comments