alexellis / alexellis/k3sup

Support for ssh_config parsing

Ouverte
#454 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Go
Étoiles
7.4k
Forks
430
Métriques de merge des PR
Aucune PR mergée en 30 j

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 :)

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.