Skip to content
This repository has been archived by the owner. It is now read-only.

update-ssh-keys doesn't handle key files that don't end in a newline #676

Closed
crawford opened this issue Sep 23, 2015 · 3 comments
Closed

update-ssh-keys doesn't handle key files that don't end in a newline #676

crawford opened this issue Sep 23, 2015 · 3 comments

Comments

@crawford
Copy link
Member

@crawford crawford commented Sep 23, 2015

Issue by pquerna
Friday Sep 04, 2015 at 18:56 GMT
Originally opened as https://github.com/coreos/init/issues/175


If you drop an authorized key into /home/core/.ssh/authorized_keys.d/, and the file doesn't contain / end in a new line, the outputted authorized_keys file is malformed.

CC @robert-chiniquy

@crawford
Copy link
Member Author

@crawford crawford commented Sep 23, 2015

Comment by marineam
Friday Sep 04, 2015 at 19:28 GMT


Amusingly we just found the exact same bug in the new Go re-implementation of update-ssh-keys: coreos/update-ssh-keys#10

@lrvick
Copy link

@lrvick lrvick commented Oct 15, 2015

This has bit my team multiple times attempting to use curl https://github.com/lrvick.keys | update-ssh-keys -a lrvick.

The result is 2 users keys get concatenated, and both users are locked out.

For now we have resorted to: cat <(curl https://github.com/lrvick.keys; echo "") | update-ssh-keys -a lrvick

@crawford
Copy link
Member Author

@crawford crawford commented Nov 11, 2015

Closed via coreos/init#184.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.