Skip to content
This repository has been archived by the owner on Dec 21, 2022. It is now read-only.

Spaces In 'identityfile' Path #100

Closed
maxmanders opened this issue Apr 10, 2015 · 5 comments
Closed

Spaces In 'identityfile' Path #100

maxmanders opened this issue Apr 10, 2015 · 5 comments

Comments

@maxmanders
Copy link

Depending on how a user chooses to manage their identities, keys might exist in folders that are named with spaces. In this case, no combination of quoting or escaping the spaces while using storm add results in a quoted identityfile line in ~/.ssh/config. To get such hosts to work, the line must be manually quoted. Would it be possible to ensure that if ' --id_file' is quoted on the command line, those quotes are persisted through to SSH config?

╭─max@hedgehog  ~/dev ‹›
╰─$ storm add --id_file "~/keys/folde with spaces/some_key" test_host ubuntu@123.123.123.123
success  test_host added to your ssh config. you can connect it by typing "ssh test_host".
╭─max@hedgehog  ~/dev ‹›
╰─$ tail ~/.ssh/config
Host test_host
    identityfile ~/keys/folde with spaces/some_key
    hostname 123.123.123.123
    user ubuntu
    port 22
╭─max@hedgehog  ~/dev ‹›
╰─$ ssh test_host
/Users/max/.ssh/config line 407: garbage at end of line; "with".
@emre
Copy link
Owner

emre commented Apr 10, 2015

thanks for the report.

checking the user input is w/ quotes or not might be tricky. but it seems we can quote the value of identityFile regardless of the user input. so as long as we do that, it doesn't matter the value has spaces on it or not, right?

@maxmanders
Copy link
Author

Er, sorry - I don’t follow.  Maybe I’m doing something wrong, but if I use either single or double quotes, or backslash escaped spaced on the command line, the string that is inserted into ~/.ssh/config does not have quotes around it - and the spaces are not escaped.  Which causes problems.  Have I just misunderstood how I add an entry with a space in the identity path?

Max Manders
w: http://maxmanders.co.uk
e: max@maxmanders.co.uk
t: +44 (0) 7866 797 983
@maxmanders

On 10 April 2015 at 11:28:26, Emre Yılmaz (notifications@github.com) wrote:

thanks for the report.

it seems we can quote the value of identityFile. so as long as we do that, it doesn't matter the value has spaces on it or not, right?


Reply to this email directly or view it on GitHub.

@emre
Copy link
Owner

emre commented Apr 10, 2015

no, you're not doing anything wrong. it's my english I think :-)

it's certainly a bug, storm should quote that value. will be done in a couple days, looks like a quick fix.

@maxmanders
Copy link
Author

You are my hero :-D

Max Manders
w: http://maxmanders.co.uk
e: max@maxmanders.co.uk
t: +44 (0) 7866 797 983
@maxmanders

On 10 April 2015 at 11:32:43, Emre Yılmaz (notifications@github.com) wrote:

no, you're not doing anything wrong. it's my english I think :-)

it's certainly a bug, storm should quote that value. will be done in a couple days, looks like a quick fix.


Reply to this email directly or view it on GitHub.

@emre
Copy link
Owner

emre commented Oct 20, 2015

This is fixed with 0.6.7.

#107

@emre emre closed this as completed Oct 20, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants