Skip to content

Commit 8df2b25

Browse files
committed
Add sshd_config
1 parent fcd8d69 commit 8df2b25

File tree

3 files changed

+144
-4
lines changed

3 files changed

+144
-4
lines changed

docs/reference/resources/Microsoft/OpenSSH/SSHD/Windows/index.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Manage SSH client and server configuration.
1616
```yaml
1717
Version : 0.1.0
1818
Kind : resource
19-
Tags : [Windows]
19+
Tags : [OpenSSH, Windows]
2020
Author : Microsoft
2121
```
2222
@@ -38,7 +38,7 @@ resources:
3838
The `Microsoft.OpenSSH.SSHD/Windows` resource enables you to idempotently manage SSH server
3939
configuration. The resource can:
4040

41-
- Add, update, and remove SSH client and server configuration settings.
41+
- Add and update SSH client and server configuration settings.
4242

4343
> [!NOTE]
4444
> This resource is installed with DSC itself on systems.
@@ -67,8 +67,6 @@ the desired state. For more information about resource capabilities, see
6767

6868
## Examples
6969

70-
<!-- Example definitions would need to be created as separate files -->
71-
7270
1. [Configure default shell PowerShell][01] - Shows how to set the default shell to PowerShell.exe
7371

7472
## Properties

docs/reference/resources/Microsoft/OpenSSH/SSHD/sshd_config/examples/export-openssh-configuration.md

Whitespace-only changes.
Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
---
2+
description: Microsoft.OpenSSH.SSHD/sshd_config resource reference documentation
3+
ms.date: 07/15/2025
4+
ms.topic: reference
5+
title: Microsoft.OpenSSH.SSHD/sshd_config
6+
---
7+
8+
# Microsoft.OpenSSH.SSHD/sshd_config
9+
10+
## Synopsis
11+
12+
Manage SSH Server Configuration.
13+
14+
## Metadata
15+
16+
```yaml
17+
Version : 0.1.0
18+
Kind : resource
19+
Tags : [OpenSSH, Windows, Linux]
20+
Author : Microsoft
21+
```
22+
23+
## Instance definition syntax
24+
25+
```yaml
26+
resources:
27+
- name: <instance name>
28+
type: Microsoft.OpenSSH.SSHD/sshd_config
29+
properties:
30+
# Required properties
31+
map: object
32+
```
33+
34+
## Description
35+
36+
The `Microsoft.OpenSSH.SSHD/sshd_config` resource allows you to export client
37+
and server configuration settings. The resource can:
38+
39+
- Export client and server configuration settings
40+
41+
> [!NOTE]
42+
> This resource is installed with DSC itself on systems.
43+
>
44+
> You can update this resource by updating DSC. When you update DSC, the updated version of this
45+
> resource is automatically available.
46+
47+
## Requirements
48+
49+
- The resource requires OpenSSH server and client to be installed on the Windows system.
50+
- The resource must run at least under a Windows Server 2019 or Windows 10 (build 1809)
51+
operating system.
52+
53+
## Capabilities
54+
55+
The resource has the following capabilities:
56+
57+
- `export` - You can use the resource to export the current SSH server configuration.
58+
59+
## Examples
60+
61+
1. [Export OpenSSH configuration][00] - Shows how to export current OpenSSH configuration.
62+
63+
## Properties
64+
65+
The following list describes the properties for the resource.
66+
67+
- **Required properties:** <a id="required-properties"></a> The following properties are always
68+
required when defining an instance of the resource. An instance that doesn't define each of these
69+
properties is invalid. For more information, see the "Required resource properties" section in
70+
[DSC resource properties][01]
71+
72+
- [map](#map) -
73+
74+
- **Key properties:** <a id="key-properties"> The following properties uniquely identify an
75+
instance. If two instances of a resource have the same values for their key properties, the
76+
instances are conflicting. For more information about key properties, see the "Key resource
77+
properties" section in [DSC resource properties][02].
78+
79+
- [map](#map) (required) -
80+
81+
### map
82+
83+
<details><summary>Expand for <code>map</code> property metadata</summary>
84+
85+
```yaml
86+
Type : object
87+
IsRequired : true
88+
IsKey : false
89+
IsReadOnly : false
90+
IsWriteOnly : false
91+
```
92+
93+
</details>
94+
95+
## Instance validating schema
96+
97+
The following snippet contains the JSON Schema that validates an instance of the resource. The
98+
validating schema only includes schema keywords that affect how the instance is validated. All
99+
non validating keywords are omitted.
100+
101+
```json
102+
{
103+
"type": "object",
104+
"required": [
105+
"map"
106+
],
107+
"properties": {
108+
"map": {
109+
"type": "object",
110+
"additionalProperties": true
111+
}
112+
}
113+
}
114+
```
115+
116+
## Exit codes
117+
118+
The resource returns the following exit codes from operations:
119+
120+
- [0](#exit-code-0) - Success
121+
- [1](#exit-code-1) - Invalid parameter
122+
123+
### Exit code 0
124+
125+
Indicates the resource operation completed without errors.
126+
127+
### Exit code 1
128+
129+
Indicates the resource operation failed due to an invalid parameter. When the resource returns this
130+
exit code, it also emits an error message with details about the invalid parameter.
131+
132+
## See also
133+
134+
- [Microsoft.OpenSSH.SSHD/Windows resource][03]
135+
- For more information about OpenSSH, see [OpenSSH Documentation][04]
136+
137+
<!-- Link definitions -->
138+
[00]: examples/export-openssh-configuration.md
139+
[01]: ../../../../../concepts/resources/properties.md#required-resource-properties
140+
[02]: ../../../../../concepts/resources/properties.md#key-resource-properties
141+
[03]: ../Windows/index.md
142+
[04]: /windowsserverdocs/WindowsServerDocs/administration/OpenSSH/openssh-overview

0 commit comments

Comments
 (0)