Skip to content
This repository has been archived by the owner on Oct 16, 2020. 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

Comments

@crawford
Copy link
Contributor

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
Contributor Author

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 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
Contributor Author

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
Development

No branches or pull requests

2 participants