Support for ssh_config parsing
- Dominant language
- Go
- Stars
- 7.4k
- Forks
- 430
- PR merge metrics
- No merged PRs in 30d
Description
**What do you want?**
Being able to refer ssh custom config defined in `~/.ssh/ssh_config`, through referencing a matching `--ip` or `--host` flag (or a new one added ad hoc) with an `Host` definition in the ssh config
**Why do you want this?**
It will easy the process of customizing/overriding ssh options (like currently supported port or ssh-key) without the need of adding support for extra flag.
**Recommended solution**
Only the subset of the ssh configs that can be mapped to the ones available at https://pkg.go.dev/golang.org/x/crypto/ssh should be supported, and the possibility to reference an `Host` to "parse" the resulting [ssh address to connect](https://github.com/alexellis/k3sup/blob/9f541feda9b7ad040337fbb7aae1256612cf7f77/cmd/install.go#L297)
Rely one of the ssh config parser packages already available from the community, with a compatible license and properly maintained for extracting the config values that will be supported.
Most likely introduce a specific flag for enabling the behavior of the ssh config support, adding something like `--ssh-config-entry` on top of the current available `--ip` and `--host` flags
**Additional context**
Please, consider this as my offer to contribute with a PR for adding the feature. The kind of involvement I'm available for, at design and solution decision level, it's the same as for the other two feature requests. Glad to just write the code of the implementation that will be decided by the maintainer :)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.