Skip to content

Instantly share code, notes, and snippets.

@usrbinkat
Created October 15, 2020 22:13
Show Gist options
  • Save usrbinkat/6aa2a567bebbfe9295fb8ec25bee2d4e to your computer and use it in GitHub Desktop.
Save usrbinkat/6aa2a567bebbfe9295fb8ec25bee2d4e to your computer and use it in GitHub Desktop.
$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