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

Doesn't support config.d #16

Open
mplinuxgeek opened this issue Mar 23, 2022 · 5 comments
Open

Doesn't support config.d #16

mplinuxgeek opened this issue Mar 23, 2022 · 5 comments
Labels
enhancement New feature or request

Comments

@mplinuxgeek
Copy link

mplinuxgeek commented Mar 23, 2022

A valid usage of ssh config files is includeing a directory of configs:
include ~/.ssh/config.d/*

fast-ssh complains that the config is invalid:

SSH configuration contains the following errors:

* SSH option `Include` provided before `Host` is specified.

Moving the include line to the end of the file then includes it with the last host in the config which is undesired behaviour.

A suggested behaviour could be to treat files in config.d as groups, I use config.d files to keep customer devices out of my main config which keeps the main config cleaner and allows me to share specific customer configs with team mates.

@hockeymikey
Copy link

I'd say go one step further: allow the user to define if they treat them as groups or just included files. I can see some people wanting to use that file organization but have the names be respected while others, like myself, would like them treated as groups.

@gfriloux
Copy link

The real issue is in the parser that is used by fast-ssh → ssh_cfg.
I created the issue there : azriel91/ssh_cfg#3

@gfriloux
Copy link

azriel91 made changes to support this case.
You can find his work here : azriel91/ssh_cfg#4

Things i note:

  • It seems to break API compatibility, so fast-ssh would need to be updated.
  • @Julien-R44 : i would like you to look if the proposed patch solves this issue, or is good for you.

As i understand changes, it would be up to fast-ssh to go load each included file individually, which seems compatible with what @mplinuxgeek and @hockeymikey suggest as feature.

@gfriloux
Copy link

gfriloux commented Aug 2, 2022

@Julien-R44 : You seem inactive or too busy these days.

I went to using fzf manage my ssh connections.
I might try again fast-ssh later if this gets fixed.

@Julien-R44
Copy link
Owner

Indeed I don't really have time to maintain fast-ssh at the moment. However if someone wants to propose a PR to fix this point, it will be accepted with pleasure.

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

No branches or pull requests

4 participants