Skip to content

Instantly share code, notes, and snippets.

@ermik
Last active December 3, 2022 16:08
Show Gist options
  • Save ermik/b95bf71eb8690859231e52509669c629 to your computer and use it in GitHub Desktop.
Save ermik/b95bf71eb8690859231e52509669c629 to your computer and use it in GitHub Desktop.
Add-WindowsCapability -Online -Name OpenSSH.Client
Add-WindowsCapability -Online -Name OpenSSH.Server
New-NetFirewallRule -Name SSH -DisplayName 'OpenSSH SSH Server Port' -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22 -Program "C:\System32\OpenSSH\sshd.exe"
Set-Service -Name sshd -StartupType 'Automatic'
Start-Service sshd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment