Skip to content
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

Sanitize Private Key with a trailing newline if none exists #183

Closed
niieani opened this issue Aug 28, 2016 · 2 comments
Closed

Sanitize Private Key with a trailing newline if none exists #183

niieani opened this issue Aug 28, 2016 · 2 comments

Comments

@niieani
Copy link

niieani commented Aug 28, 2016

A private key must be trailed by a newline, otherwise it will incorrectly prompt for a passphrase.
While copying and pasting the private key via the GUI it's easy to omit the trailing enter and scratch your head thinking: why won't Semaphore connect to your hosts?
There should be some built-in sanitization on the private key field that would add the trailing enter, if missing.

@niieani
Copy link
Author

niieani commented Aug 28, 2016

In fact, what I'm seeing is the opposite behavior - the key seems to be sanitized the wrong way by trimming the trailing whitespace, instead of adding it, causing SSH unable to connect with a ed25519 key. Adding the trailing newline manually fixes the problem temporarily, but Semaphore recreated the key with every start of the task. :/

@niieani niieani changed the title Sanitize Private Key with a trailing enter if none exists Sanitize Private Key with a trailing newline if none exists Aug 28, 2016
@niieani
Copy link
Author

niieani commented Aug 28, 2016

A workaround for now is to trail the private key with two newlines and put some character afterwards (it will be ignored by SSH).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant