docs: Add reference documentation for Microsoft.OpenSSH.SSHD/Windows#934
docs: Add reference documentation for Microsoft.OpenSSH.SSHD/Windows#934Gijsreyn wants to merge 15 commits into
Microsoft.OpenSSH.SSHD/Windows#934Conversation
598a6fe to
e0fedee
Compare
e0fedee to
fa1b824
Compare
adb4db3 to
c6dba04
Compare
c6dba04 to
8df2b25
Compare
8df2b25 to
3509e6b
Compare
3509e6b to
40d6808
Compare
There was a problem hiding this comment.
Pull request overview
Adds reference documentation under docs/reference/resources for the built-in OpenSSH DSC resources, intended to support issue #665 (“Document built-in resources”).
Changes:
- Adds a new reference page and example for
Microsoft.OpenSSH.SSHD/Windows. - Adds a new reference page for
Microsoft.OpenSSH.SSHD/sshd_config. - Adds (but currently leaves empty) an
sshd_configexample page referenced from the new index.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 17 comments.
| File | Description |
|---|---|
| docs/reference/resources/Microsoft/OpenSSH/SSHD/Windows/index.md | New reference doc for the Windows OpenSSH “windows-global” resource (default shell settings). |
| docs/reference/resources/Microsoft/OpenSSH/SSHD/Windows/examples/configure-default-shell-powershell.md | New example showing how to set the default shell to Windows PowerShell. |
| docs/reference/resources/Microsoft/OpenSSH/SSHD/sshd_config/index.md | New reference doc for the sshd_config resource (but currently mismatches actual resource schema/capabilities). |
| docs/reference/resources/Microsoft/OpenSSH/SSHD/sshd_config/examples/export-openssh-configuration.md | Example file referenced by the docs, but currently empty. |
fc9176a to
3cc2e29
Compare
…n/operation-methods into reference-doc-sshdconfig
Microsoft.OpenSSH.SSHD/Windows
| > [!NOTE] | ||
| > The output is truncated in this example. The actual output includes all effective | ||
| > `sshd_config` directives for your system, including defaults inherited from OpenSSH. |
There was a problem hiding this comment.
The default behavior for export will actually not include inherited defaults, but get will.
To override the default for either one, the boolean property _includeDefaults can be used.
There was a problem hiding this comment.
when includeDefaults is true, in addition to the property: value output, the names of any inherited properties, are listed under an _inheritedDefaults array, i.e. _inheritedDefaults: [port, addressfamily]
| To re-apply the saved configuration to a system, use the [dsc config set][01] command: | ||
|
|
||
| ```powershell | ||
| dsc config set --document sshd_backup.dsc.config.yaml |
There was a problem hiding this comment.
Use _purge = true to apply the saved configuration exactly.
By default, _purge = false, so any other directives in the file on another system will not be overwritten.
| permitrootlogin = 'no' | ||
| } | ConvertTo-Json | ||
|
|
||
| dsc resource get --resource Microsoft.OpenSSH.SSHD/sshd_config --input $instance |
There was a problem hiding this comment.
| dsc resource get --resource Microsoft.OpenSSH.SSHD/sshd_config --input $instance | |
| dsc resource export --resource Microsoft.OpenSSH.SSHD/sshd_config --input $instance |
use export here - get does not support filtering by keyword
| 2. [Manage SSH server configuration settings][02] - Shows how to get and set specific sshd_config | ||
| directives. | ||
|
|
||
| ## Properties |
There was a problem hiding this comment.
Not sure if here or the requirements section above would be a good place to note that metadata can be used specify a non-default sshd_config filepath, such as:
metadata:
filepath: "c:\\programdata\\ssh\\non_default_sshd_config"
PR Summary
As part of #665, this PR adds reference documentation for the Microsoft.OpenSSH.SSHD/Windows resource.
PR Context