You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Fix accepted values for ControlMaster and StrictHostKeyChecking - #42
Both options were routed through parameter-with-boolean-values-plus-ask, which
only recognizes yes | no | ask and marks every other value invalid.illegal.sshd_config. Per man ssh_config, ControlMaster also accepts auto and autoask, and StrictHostKeyChecking also accepts accept-new and off.
Changes
One commit per option; each moves the option out of the shared rule into its own
context, following the existing parameter-<option> naming pattern:
ControlMaster now accepts yes | no | ask | auto | autoask. Completions
updated via src/options.yaml and regenerated with src/build.py.
StrictHostKeyChecking now accepts yes | no | ask | accept-new | off. off is scoped as a boolean false alongside no, matching the man page ("If
this flag is set to no or off ..."). No completions change needed: they
already listed both values, so autocomplete no longer inserts values the
highlighter flags.
UpdateHostKeys and VerifyHostKeyDNS keep the shared rule unchanged.
Both rules keep the unscoped consume-while-typing matches and the invalid.illegal catch-all, so typos are still flagged.
Testing
New assertions in test/syntax_test_client.ssh_config cover the four newly
accepted values, a mid-typing partial, and an invalid value per option.
Full suite run locally with the syntax_tests binary (build 4200): all test
files pass, before and after each commit.
I yanked the ControlMaster snippet changes to a new commit in your name. In another commit, I dropped ControlMaster and the host key checking out of the strict yes/no/ask group and added some of the valid values to the generic value list.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Both options were routed through
parameter-with-boolean-values-plus-ask, whichonly recognizes
yes | no | askand marks every other valueinvalid.illegal.sshd_config. Perman ssh_config,ControlMasteralso acceptsautoandautoask, andStrictHostKeyCheckingalso acceptsaccept-newandoff.Changes
One commit per option; each moves the option out of the shared rule into its own
context, following the existing
parameter-<option>naming pattern:ControlMasternow acceptsyes | no | ask | auto | autoask. Completionsupdated via
src/options.yamland regenerated withsrc/build.py.StrictHostKeyCheckingnow acceptsyes | no | ask | accept-new | off.offis scoped as a boolean false alongsideno, matching the man page ("Ifthis flag is set to no or off ..."). No completions change needed: they
already listed both values, so autocomplete no longer inserts values the
highlighter flags.
UpdateHostKeysandVerifyHostKeyDNSkeep the shared rule unchanged.invalid.illegalcatch-all, so typos are still flagged.Testing
test/syntax_test_client.ssh_configcover the four newlyaccepted values, a mid-typing partial, and an invalid value per option.
syntax_testsbinary (build 4200): all testfiles pass, before and after each commit.
Before / After
Stock package:
With this fix: