New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Comments

Projects
None yet
2 participants
@crawford
Member

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

This comment has been minimized.

Member

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

This comment has been minimized.

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

This comment has been minimized.

Member

crawford commented Nov 11, 2015

Closed via coreos/init#184.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment