Updated Install Win32 OpenSSH (markdown)

Manoj Ampalam 2017-05-15 00:30:59 -07:00
parent ccb49086be
commit c05a1da2c1

@ -10,17 +10,8 @@
* Install sshd and ssh-agent services.
* `powershell -executionpolicy bypass -file install-sshd.ps1`
* Setup SSH host keys
* `.\ssh-keygen.exe -A` (This will generate all [secured][Secure file] 'host' keys (starting build [v0.0.13.0][build13]).)
* If host keys were generated by ssh-keygen.exe before build [v0.0.13.0][build13], you will have to re-ACL them before use. please see [Security protection][Secure file] for details.
* (Required starting build [v0.0.13.0][build13]. ) Grant "NT service\sshd" Read access the host key files:
```
Get-ChildItem -Path 'C:\Program Files\OpenSSH\ssh_host_*_key*' | % {
$acl = get-acl $_.FullName
$ar = New-Object System.Security.AccessControl.FileSystemAccessRule("NT Service\sshd", "Read", "Allow")
$acl.SetAccessRule($ar)
Set-Acl $_.FullName $acl
}
```
* `.\ssh-keygen.exe -A`.
* See [here](https://github.com/PowerShell/Win32-OpenSSH/wiki/Security-protection-of-various-files-in-Win32-OpenSSH) for instructions to set the right permissions on host keys.
* Secure SSH host keys (optional)
* `Start-Service ssh-agent`
* download psexec from [here](https://technet.microsoft.com/en-us/sysinternals/pstools)