alfred-ssh icon indicating copy to clipboard operation
alfred-ssh copied to clipboard

Add support for `Include`

Open ghost opened this issue 6 years ago • 8 comments

The ~/.ssh/config file supports an Include directive to load more config files, making it easier to separate groups of hosts. For example:

# ~/.ssh/config
IdentityFile ~/.ssh/id_rsa
IdentityFile ~/.ssh/id_rsa_work

Include ~/.ssh/config_work
Include ~/.ssh/config_private

Hosts from these Included configuration files should also be shown.

ghost avatar Dec 10 '18 12:12 ghost

Duplicate of #3, which was attempted in #7.

The workflow uses a 3rd-party library to parse ssh config files. If you can find one that supports Include, I can integrate it.

deanishe avatar Dec 11 '18 09:12 deanishe

Looks like https://github.com/danieljimenez/ssh_config should have supported that, but it doesn't 🤔 Seems he misunderstood how Include works. I'll see if I can get that working.

ghost avatar Dec 11 '18 10:12 ghost

Yeah, it doesn’t work like it’s supposed to.

Now you bring it up, i should probably revert to the old library with no Include support, rather than one with broken support.

Include support would be awesome. I had another look through the available libs, but none I could find supports it :(

deanishe avatar Dec 11 '18 11:12 deanishe

@deanishe I know this is old issue. but I will take a look and see if can figure out recursive ssh configs. doesn't look like anyone else has attempted to figure it out.

georgesnow avatar Oct 27 '19 15:10 georgesnow

Oops. I have a working parser here. I'm afraid I just haven't bothered to tidy it up and integrate it yet.

deanishe avatar Oct 27 '19 15:10 deanishe

Looks like I never got around to that either 🙈

@deanishe would be cool if you could include that!

ghost avatar Oct 28 '19 09:10 ghost

Any updates on this? I saw a mention elsewhere on your Alfred-Workflows issues (awesome lib btw, thanks very much!) that you're rewriting most things in Python3 - is this Include file support getting deferred until the automation landscape settles down a bit?

ideologysec avatar May 19 '20 22:05 ideologysec

is this Include file support getting deferred until the automation landscape settles down a bit?

No, I'm just really busy with work atm. It's not helping that when I look at the workflow's code, I want to rewrite the whole thing…

deanishe avatar May 20 '20 07:05 deanishe