From 87217efacf515bd12a33606e176c8dbf1b3dabda Mon Sep 17 00:00:00 2001 From: Manoj Ampalam Date: Thu, 25 May 2017 12:04:41 -0700 Subject: [PATCH] Updated Security protection of various files in Win32 OpenSSH (markdown) --- Security-protection-of-various-files-in-Win32-OpenSSH.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Security-protection-of-various-files-in-Win32-OpenSSH.md b/Security-protection-of-various-files-in-Win32-OpenSSH.md index 5197870..ab46dab 100644 --- a/Security-protection-of-various-files-in-Win32-OpenSSH.md +++ b/Security-protection-of-various-files-in-Win32-OpenSSH.md @@ -32,6 +32,10 @@ Steps to fix these permissions PS C:\>icacls .\ssh_host_dsa_key /setowner system PS C:\>icacls .\ssh_host_dsa_key /remove otheruser ``` +At this point, you could do the following to replicate these permissions onto other host keys +``` +PS C:\>get-acl .\ssh_host_dsa_key | Set-Acl ssh_host*key +``` ### authorized_keys authorized_keys is an user associated file that represents a list of authorized public keys that could be used for (key-based) user authentication. Unauthorized access to this file compromises the associated user's account. This file should not be owned by, nor provide access to any other user. Note that sshd service needs **read** access to authorized_keys for public key validation. Following is a misconfigured authorized key because