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

Abilitiy to add arbitrary options #22

Closed
keyneston opened this issue Jul 10, 2013 · 5 comments
Closed

Abilitiy to add arbitrary options #22

keyneston opened this issue Jul 10, 2013 · 5 comments

Comments

@keyneston
Copy link

SSH has a large collection of options that can be added to a host. See man ssh_config for a list.

It would be nice if when editing we could add and edit arbitrary options. As an example:

# Host *.dev.example.com
# IdentityFile /home/bob/.ssh/dev_id_rsa
# StrictHostKeyChecking no
# UserKnownHostsFile /dev/null

storm add '*.dev.example.com' -o "StrictHostKeyChecking=no" -o "UserKnownHostsFile=/dev/null" -o "IdentityFile=/home/bob/.ssh/dev_id_rsa"

This would would also allow --id_file to be deprecated and instead use a standard format for adding options.

@emre
Copy link
Owner

emre commented Jul 10, 2013

That's a great idea. I will implement this with #19 probably next weekend. I just need free time to do it.

@emre
Copy link
Owner

emre commented Jul 17, 2013

cli library that storm uses is manage.py which does not support multiple values for a single argument.

I think about implementing this with a slight change on the usage example you suggested.

storm add vps root@emre.io -o "configOption=yes anotherConfigOption:1"

@keyneston
Copy link
Author

The reason I suggested that particular syntax is because it mirrors the syntax for passing the values to scp/ssh themselves.

At the same time I understand the limitations in implementing it and in that context your suggestion path makes a lot of sense.

Granted I'd be very careful about what you use as a separator. For example SendEnv allows multiple environment variables to specified by separating the variables with white space.

@emre
Copy link
Owner

emre commented Jul 18, 2013

I decided to remove manage.py and use good, old argparse module for the new versions. It limits so much that brings more difficulty than I expected.

@emre
Copy link
Owner

emre commented Jul 18, 2013

It's up.

$ storm add web-prod web@webprod.com --o "StrictHostKeyChecking=no" --o "UserKnownHostsFile=/dev/null" --o "IdentityFile=/home/bob/.ssh/dev_id_rsa"
success  web-prod added to your ssh config. you can connect it by typing "ssh web-prod".

$ storm search web-prod
Listing results for web-prod:
    web-prod -> web@webprod.com:22

You can try it after a "pip install stormssh --upgrade"

@emre emre closed this as completed Jul 22, 2013
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