authorized_keys file missing final newline
When using cat
to show the contents of an authorized_keys file you notice the the prompt afterwards does not start at a new line.
Editing the file with e.g. vim automatically adds the final newline again ... but we can automate that. It's lost in the way implode is used.