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

assh does not support non-default config from commandline #29

Open
tomster opened this issue May 31, 2014 · 4 comments
Open

assh does not support non-default config from commandline #29

tomster opened this issue May 31, 2014 · 4 comments

Comments

@tomster
Copy link
Contributor

tomster commented May 31, 2014

when calling assh with -c to specify a non-default config file from the command line it seems to get passed through to ssh because the message reads:

assh -c etc/foo.conf bar
Unknown cipher type 'etc/foo.conf'
@fschulze
Copy link
Member

Try aws -c etc/foo.conf ssh bar

@tomster
Copy link
Contributor Author

tomster commented May 31, 2014

sure, that works, of course. but that's not really convenient to use for rsync and/or sftp.

the whole point of assh is convenience in the first place :)

i looked into the implementation but couldn't find a ready means of fixing this, short of using argparse in assh itself, which i'd consider a hack...

@tomster
Copy link
Contributor Author

tomster commented Jun 3, 2014

i've debugged this a bit more and it seems the bug is bigger than initially expected...

in fact the whole -c | --config feature seems to be broken, the values passed into the AWS.__init__ always take precedence, the value from the command line arguments is never taken into account!

it seems that this is triggered by AWS.config being a lazy property that only consults the value of self.configfile which at this point has already been initialized with the values passed into __init__ before parsing of the args has happened.

try renaming any aws.conf you have in any project you're using mr.awsome in and I dare you to get it working with -c :-)

@fschulze
Copy link
Member

My proposed solution works for rsync, because it allows setting a whole command for ssh. For things like scp you have to specify a script and can't use any options, so fixing the option somehow wouldn't work anyway. You can only get scp working by creating a script which uses ploy ... ssh with the correct options.

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

2 participants