From c05a1da2c1ebcb5980b3f0dbce9138394d2e57d3 Mon Sep 17 00:00:00 2001 From: Manoj Ampalam Date: Mon, 15 May 2017 00:30:59 -0700 Subject: [PATCH] Updated Install Win32 OpenSSH (markdown) --- Install-Win32-OpenSSH.md | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/Install-Win32-OpenSSH.md b/Install-Win32-OpenSSH.md index 2024ba8..459687b 100644 --- a/Install-Win32-OpenSSH.md +++ b/Install-Win32-OpenSSH.md @@ -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)