-
Notifications
You must be signed in to change notification settings - Fork 296
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
Deprecated sshd options #102
Comments
@DevelopForLizardz
Then only when you set them in pillar explicitly or override them with a different value will they be used in sshd_config file. |
@DevelopForLizardz and @alxwr we need to make sure that the options change are indeed the defaults sshd will use if commented... |
Though its not a big issue, I found it odd that values set to the same as default aren't commented to begin with. Perhaps you might consider that for a future strategy. |
@DevelopForLizardz @aboe76 IMHO the main problem is the question „Which defaults?“. They change from one OpenSSH version to another. So I'd start by reliably determining the actual OpenSSH version. Either we get this via Just in case I missed something: Is there a way to add Grains to Salt formulas (just like Facts to Puppet modules)? |
@zatricky as @alxwr just said the defaults change through the versions. @alxwr on non-rolling-release platforms with |
Totally agreed. I was rather talking about the mechanism (defaults vs. grains). Frankly the concept of documenting the entire history of OpenSSH config differences in I propose another solution involving less maintenance cost: drop We can't reliably know the exact version of OpenSSH. Therefore we can't decide which directives to include or exclude or which values are the correct defaults. (And even if we could: what if we get it wrong?) Let default directives and values be handled by OpenSSH and/or Pillar. :-) |
@alxwr I think you are right with your proposed solution to assume OpenSSH defaults to be sane and secure and only uncomment those options which are in Pillar. This makes it clearer for everyone that uses this formula to set exceptions on the defaults in pillar, and leave everything else the same. |
My 2c: Something I don't see much in formulas (that worked really well for me when I used to write puppet modules), and that goes in the lines of @alxwr proposal, is the following logic regarding configurations:
This approach has these advantages:
|
I think that @alxwr and @javierbertoli have the right idea. I could be misunderstanding, but wouldn't picking default values that local pillar modifications can then be applied to require a large |
@javierbertoli I agree, but don't we already have that (in this formula)?
@DevelopForLizardz, currently we're replacing whatever config there was before with defaults+Pillar. That's the most stable (because simple) way of handling config files. I would not want to change this. When I say "defaults" I don't mean the stuff distro X puts in the config file, but rather the settings OpenSSH uses when given an empty config file. The idea is this: Don't pick any defaults at all, let OpenSSH do this.
Currently there are three sources of effective config used by OpenSSH:
When we cease setting defaults this is reduced to:
=> no initial config needed But: I strongly suggest showing secure settings (Ciphers, KexAlgos, ...) in Does anybody see a problem with this approach? If not I'd be happy to submit a PR as soon as my time allows for it. |
@alxwr I don't see a problem with it, I'm happy to test your PR. |
It seems I didn't grasp your proposal very well the first time @alxwr, so I appreciate your clarification- thank you. I think I got mixed up when @javierbertoli commented about formulas picking default values when pillar data for a config is specified. My apologies. Anyways though, I'm on the same page as @aboe76. |
👍 @alxwr |
Oh man, time's running fast. Sry, got loads of other work to do. Still eager to implement this! |
at long last: #117 |
From changelog at https://www.openssh.com/releasenotes.html Highlighting how this change to defaults-handling is essential, I just updated a bleeding-edge host (ArchLinux) to openssh 7.6 and found sshd refused to start. Most changes are because SSH protocol v1 support is now "deleted" - but these mostly result in warnings, not errors. This particular MAC change does result in an error, causing that sshd refuses to start. |
saltstack-formulas#156 This is only a beginning/partial edit which serves to introduce a possible format for indicating potentially unnecessary configuration. Over time, other options can be indicated as D or R where appropriate. Related saltstack-formulas#150 and saltstack-formulas#102
I am using this formula to manage openssh in small home environment, and while applying some states I came across deprecation warnings in the sshd logs of a Fedora 26 minion:
(I don't have the deprecated options specified in Pillar.)
I did a little research and it seems to be that these options were removed from the sshd_config file in recent versions of OpenSSH 7, in preparation of removing support for SSH protocol 1. This makes sense as Fedora 26 uses version 7.5 of OpenSSH and I don't get these warnings when running the state on Centos 7.3 systems which are using version 6.6 of OpenSSH.
This isn't a major issue as nothing is broken of course, but I thought it might be a good idea to bring it up.
The text was updated successfully, but these errors were encountered: