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
@@ -102,15 +102,15 @@ To enable SSHD using PowerShell:
102
102
103
103
To install the OpenSSH components on Windows Server devices:
104
104
105
-
1. Select **Start**, type _Optional Features_ in the search box, then select **Add an optional feature**.
105
+
1. Select **Start**, type _Optional Features_ in the search box, then select **Optional Features**.
106
106
107
107
1. Scan the list to see if the OpenSSH is already installed. If not, at the top of the page, select **Views features**, then:
108
108
109
-
- Search for and select **OpenSSH Client**, select **Next**, then **Install**
109
+
- Search for and select **OpenSSH Client**, then select **Add**
110
110
111
-
- Search for and select **OpenSSH Server**, select **Next**, then **Install**
111
+
- Search for and select **OpenSSH Server**, then select **Add**
112
112
113
-
1. Open the **Services** desktop app. (Select **Start**, type _services.msc_ in the search box, and then select the **Service** app or press <kbd>ENTER</kbd>.)
113
+
1. Open the **Services** desktop app. (Select **Start**, type _services.msc_ in the search box, and then select the **Services** app or press <kbd>ENTER</kbd>.)
114
114
115
115
1. In the details pane, double-click **OpenSSH SSH Server**.
116
116
@@ -171,7 +171,7 @@ To install OpenSSH using PowerShell:
171
171
Set-Service -Name sshd -StartupType 'Automatic'
172
172
173
173
# Confirm the Firewall rule is configured. It should be created automatically by setup. Run the following to verify
@@ -182,7 +182,95 @@ To install OpenSSH using PowerShell:
182
182
---
183
183
::: zone-end
184
184
185
-
::: zone pivot="windows-server-2022,windows-server-2019,windows-10"
185
+
::: zone pivot="windows-server-2022"
186
+
187
+
## Install OpenSSH Server & Client
188
+
189
+
### [GUI](#tab/gui)
190
+
191
+
To install the OpenSSH components on Windows Server devices:
192
+
193
+
1. Select **Start**, type _Optional Feature_ in the search box, then select **Add an optional feature**.
194
+
195
+
1. Scan the list to see if the OpenSSH is already installed. If not, at the top of the page, select **Add a feature**, then:
196
+
197
+
- Search for **OpenSSH Client**, then select **Install**
198
+
199
+
- Search for **OpenSSH Server**, then select **Install**
200
+
201
+
1. Open the **Services** desktop app. (Select **Start**, type _services.msc_ in the search box, and then select the **Services** app or press <kbd>ENTER</kbd>.)
202
+
203
+
1. In the details pane, double-click **OpenSSH SSH Server**.
204
+
205
+
1. On the **General** tab, from the **Startup type** drop-down menu, select **Automatic** and then select **Ok**.
206
+
207
+
1. To start the service, select **Start**.
208
+
209
+
> [!NOTE]
210
+
> Installing OpenSSH Server creates and enables a firewall rule named `OpenSSH-Server-In-TCP`. This rule allows inbound SSH traffic on port 22. If this rule isn't enabled and this port isn't open, connections are refused or reset.
211
+
212
+
### [PowerShell](#tab/powershell)
213
+
214
+
To install OpenSSH using PowerShell:
215
+
216
+
1. Run PowerShell as an Administrator.
217
+
218
+
1. Run the following cmdlet to make sure that OpenSSH is available:
219
+
220
+
```powershell
221
+
Get-WindowsCapability -Online | Where-Object Name -like 'OpenSSH*'
222
+
```
223
+
224
+
The command should return the following output if neither are already installed:
225
+
226
+
```powershell
227
+
Name : OpenSSH.Client~~~~0.0.1.0
228
+
State : NotPresent
229
+
230
+
Name : OpenSSH.Server~~~~0.0.1.0
231
+
State : NotPresent
232
+
```
233
+
234
+
1. After that, run the following cmdlets to install the server or client components as needed:
1. To start and configure OpenSSH Server for initial use, open an elevated PowerShell prompt (right-click, then select **Run as an administrator**), then run the following commands to start the `sshd service`:
253
+
254
+
```powershell
255
+
# Start the sshd service
256
+
Start-Service sshd
257
+
258
+
# OPTIONAL but recommended:
259
+
Set-Service -Name sshd -StartupType 'Automatic'
260
+
261
+
# Confirm the Firewall rule is configured. It should be created automatically by setup. Run the following to verify
262
+
if (!(Get-NetFirewallRule -Name "OpenSSH-Server-In-TCP" -ErrorAction SilentlyContinue)) {
263
+
Write-Output "Firewall Rule 'OpenSSH-Server-In-TCP' does not exist, creating it..."
Write-Output "Firewall rule 'OpenSSH-Server-In-TCP' has been created and exists."
267
+
}
268
+
```
269
+
270
+
---
271
+
::: zone-end
272
+
273
+
::: zone pivot="windows-server-2019,windows-10"
186
274
187
275
## Install OpenSSH Server & Client
188
276
@@ -198,7 +286,7 @@ To install the OpenSSH components on Windows Server devices:
198
286
199
287
- Search for **OpenSSH Server**, then select **Install**
200
288
201
-
1. Open the **Services** desktop app. (Select **Start**, type _services.msc_ in the search box, and then select the **Service** app or press <kbd>ENTER</kbd>.)
289
+
1. Open the **Services** desktop app. (Select **Start**, type _services.msc_ in the search box, and then select the **Services** app or press <kbd>ENTER</kbd>.)
202
290
203
291
1. In the details pane, double-click **OpenSSH SSH Server**.
204
292
@@ -259,7 +347,7 @@ To install OpenSSH using PowerShell:
259
347
Set-Service -Name sshd -StartupType 'Automatic'
260
348
261
349
# Confirm the Firewall rule is configured. It should be created automatically by setup. Run the following to verify
0 commit comments