Doesn't support config.d
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.
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.
The real issue is in the parser that is used by fast-ssh → ssh_cfg. I created the issue there : https://github.com/azriel91/ssh_cfg/issues/3
azriel91 made changes to support this case.
You can find his work here : https://github.com/azriel91/ssh_cfg/pull/4
Things i note:
- It seems to break API compatibility, so
fast-sshwould 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.
@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.
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.