-
-
Save usrbinkat/6aa2a567bebbfe9295fb8ec25bee2d4e to your computer and use it in GitHub Desktop.
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
$url = "https://github.com/PowerShell/Win32-OpenSSH/releases/download/v8.1.0.0p1-Beta/OpenSSH-Win32.zip" | |
$output = "C:\OpenSSH-Win32.zip" | |
$start_time = Get-Date | |
$wc = New-Object System.Net.WebClient | |
$wc.DownloadFile($url, $output) | |
Expand-Archive c:\OpenSSH-Win32.zip c:\Program Files\OpenSSH | |
powershell.exe -ExecutionPolicy Bypass -File install-sshd.ps1 | |
New-NetFirewallRule -Name sshd -DisplayName 'OpenSSH Server (sshd)' -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22 | |
net start sshd | |
Set-Service sshd -StartupType Automatic |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment