Created
January 26, 2021 14:39
-
-
Save kmf/78573e73e239b3afb09a22fc88431fd4 to your computer and use it in GitHub Desktop.
Windows10-SSHD
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get-WindowsCapability -Online | ? Name -like 'OpenSSH*' | |
Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0 | |
Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0 | |
Start-Service sshd | |
Set-Service -Name sshd -StartupType 'Automatic' | |
Get-NetFirewallRule -Name *ssh* | |
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