- 
                Notifications
    You must be signed in to change notification settings 
- Fork 803
Install Win32 OpenSSH
Starting with GitHub Release 8.9.1.0, OpenSSH Beta releases are available through WinGet. With WinGet installed on the machine, use the following commands:
- Search:
 winget search "openssh beta"
- Install:
 winget install "openssh beta"
- Uninstall:
 winget uninstall "openssh beta"
note: to install/uninstall only the OpenSSH client or OpenSSH server, see https://github.com/PowerShell/Win32-OpenSSH/wiki/Install-Win32-OpenSSH-Using-MSI for args that can be passed to winget via --override (https://learn.microsoft.com/en-us/windows/package-manager/winget/install).
- 
Win32-OpenSSH Github releases can be installed on Windows 7 and up. 
- 
Note these considerations and project scope first. 
- 
Download the latest build of OpenSSH. To get links to latest downloads this wiki page. 
- 
Extract contents of the latest build to C:\Program Files\OpenSSH(Make sure binary location has the Write permissions to just to SYSTEM, Administrator groups. Authenticated users should and only have Read and Execute.)
- 
In an elevated Powershell console, run the following - powershell.exe -ExecutionPolicy Bypass -File install-sshd.ps1
 
- 
Open the firewall for sshd.exe to allow inbound SSH connections - New-NetFirewallRule -Name sshd -DisplayName 'OpenSSH Server (sshd)' -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22
 Note: New-NetFirewallRuleis for Windows 2012 and above servers only. If you're on a client desktop machine (like Windows 10) or Windows 2008 R2 and below, try:netsh advfirewall firewall add rule name=sshd dir=in action=allow protocol=TCP localport=22
- 
Start sshd(this will automatically generate host keys under %programdata%\ssh if they don't already exist)- net start sshd
 
- 
Optional 
- Start Windows Powershell as Administrator
- Navigate to the OpenSSH directory
- cd 'C:\Program Files\OpenSSH'
 
- Run the uninstall script
- powershell.exe -ExecutionPolicy Bypass -File uninstall-sshd.ps1
 
- MSI Install Instructions
- Script Install Instructions
- Alternative installation using the universal installer
- Retrieving download links for the latest packages