# Install the OpenSSH Client
Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0
# Install the OpenSSH Server
Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
try gpedit.msc then;
Computer Configuration\Administrative Templates\System
Specify settings for optional component installation and component repair Enabled
Also check the box for
Download repair content and optional features directly from Windows Update instead of Windows Server Update Services (WSUS)
# Start the sshd service
Start-Service sshd
# OPTIONAL but recommended:
Set-Service -Name sshd -StartupType 'Automatic'
# Confirm the firewall rule is configured. It should be created automatically by setup.
Get-NetFirewallRule -Name *ssh*
# There should be a firewall rule named "OpenSSH-Server-In-TCP", which should be enabled
# If the firewall does not exist, create one
New-NetFirewallRule -Name sshd -DisplayName 'OpenSSH Server (sshd)' -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22
try gpedit.msc then;
Also check the box for
Download repair content and optional features directly from Windows Update instead of Windows Server Update Services (WSUS)