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

Allow managing ssh_config(5) configuration file #41

Merged
merged 1 commit into from
Oct 5, 2018
Merged

Allow managing ssh_config(5) configuration file #41

merged 1 commit into from
Oct 5, 2018

Conversation

smortex
Copy link
Member

@smortex smortex commented Oct 4, 2018

This is heavily based on the code to manage the sshd_config(5) configuration file. For consistency, it does not enforce types for the configuration parameters.

Some basic testing has been setup, but since it implies a lot of duplication, ssh::client::host and ssh::client::match defined types are not tested for now.

I guess some duplication could be removed but I could not find a way to do so without the client and server being configured in fundamentally different ways, which would be unexpected. While a global refactoring might make sense, it's a huge task, and I would not want to start going in this direction if you do not second this 😉

This is heavily based on the code to manage the `sshd_config(5)`
configuration file.  For consistency, it does not enforce types for the
configuration parameters.

Some basic testing has been setup, but since it implies a lot of
duplication, ssh::client::host and ssh::client::match defined types are
not tested for now.
@zachfi
Copy link
Collaborator

zachfi commented Oct 5, 2018

Excellent. Without validating the configuration options too close, this looks good. Thanks for the efforts. As for the config types, that certainly would be nice since pretty much everything is a string. When I started the module, I parsed the man page for all the keywords can called it good. I'm open to change for sure, but also not too worried about it. I'd been using the latest manpage from openbsd to give me the options for config and review each time there is a release. That said, I know there were some client options I'd skipped since it wasn't implemented here.

Thanks again @smortex. Good to hear from you again.

@zachfi zachfi merged commit 95463fc into opus-codium:master Oct 5, 2018
@smortex
Copy link
Member Author

smortex commented Oct 5, 2018

Cool, so let's keep this that way for now: I don't think it will be a lot of work for maintenance, and if it becomes, we could address this with some refactoring to reduce duplication later (and then if there is no duplication, it may make sense to look into validating parameter types) 😄 .

The client configuration happens to be handy for syncing clients and servers configurations in profiles (e.g. SendEnv and AcceptEnv).

@smortex smortex deleted the ssh_config branch March 26, 2019 04:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants