Skip to content

Instantly share code, notes, and snippets.

@lemajes
Created August 18, 2021 13:18
Show Gist options
  • Save lemajes/5a77acd4236b4e22d2176472b86ab433 to your computer and use it in GitHub Desktop.
Save lemajes/5a77acd4236b4e22d2176472b86ab433 to your computer and use it in GitHub Desktop.
[Server 2019] Install OpenSSH Server #windows #server #2019 #openssh #install
  • Open elevated PowerShell

  • 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

  • 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment