Skip to content
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.

Few command lines to get OpenSSH updated manually.

Notifications You must be signed in to change notification settings

mapeca/update-openssh-windows

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 

Repository files navigation

update-openssh-windows

Few command lines to get OpenSSH updated manually.

Download binary files from latest release

Get the latest release from this repo https://github.com/PowerShell/Win32-OpenSSH/releases
Unzip it on a folder. Execute the following commands with elevated privileges in powershell.
$oldAcl = Get-Acl -Path C:\Windows\System32\OpenSSH\

$uname = $env:username

takeown.exe /a /r /f C:\Windows\System32\OpenSSH\

$openSshBins = (Get-ChildItem 'C:\WINDOWS\System32\OpenSSH\').Name

$perm = $uname + ":F"

$openSshBins | %{ icacls "C:\Windows\System32\OpenSSH\$_" /grant $perm /T }

Path on this command takes binary downloaded files
$openSshBins | %{ Copy-Item -Path .\openssh\$_ -Destination C:\Windows\System32\OpenSSH\ }

$perm = $uname

$openSshBins | %{ icacls "C:\Windows\System32\OpenSSH\$_" /remove $perm /T }

Set-Acl -Path C:\Windows\System32\OpenSSH\ -AclObject $oldAcl

Check OpenSSH version ssh -V

Example output

PS C:\ > ssh -V
OpenSSH_for_Windows_8.1p1, LibreSSL 2.6.5

About

Few command lines to get OpenSSH updated manually.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published