OpenSSH Server in Windows Server Core

Posted by Erika Tynn on July 12, 2020 · 1 min read

Instead of using SMB to transfer files into a Windows Server Core instance, why not use SCP over SSH?

Search online repository for OpenSSH packages

Get-WindowsCapability -Online |  ?{$_.Name -Like 'openssh*'}

Example output:

Name  : OpenSSH.Client~~~~
State : Installed

Name  : OpenSSH.Server~~~~
State : NotPresent

Install OpenSSH Server

Add-WindowsCapability -Online -Name OpenSSH.Server~~~~

Start OpenSSH Server

Start-Service sshd
Set-Service sshd -StartupType 'Automatic'

Verify firewall rule enabled

Get-NetFirewallRule -Name *ssh*

Example output:

Name                  : OpenSSH-Server-In-TCP
DisplayName           : OpenSSH SSH Server (sshd)
Description           : Inbound rule for OpenSSH SSH Server (sshd)
DisplayGroup          : OpenSSH Server
Group                 : OpenSSH Server
Enabled               : True
Profile               : Any
Platform              : {}
Direction             : Inbound
Action                : Allow
EdgeTraversalPolicy   : Block
LooseSourceMapping    : False
LocalOnlyMapping      : False
Owner                 :
PrimaryStatus         : OK
Status                : The rule was parsed successfully from the store. (65536)
EnforcementStatus     : NotApplicable
PolicyStoreSource     : PersistentStore
PolicyStoreSourceType : Local