From 96ce316bcd159253e9f724a807fb23af5f51706c Mon Sep 17 00:00:00 2001 From: Rafael Kitover Date: Thu, 22 Jul 2021 16:14:48 +0000 Subject: [PATCH] Update openssh instructions for windows env. Add commands to delete the ssh-agent service, otherwise the installer throws an error. Add instructions for setting permissions on authorized_keys and private key. Signed-off-by: Rafael Kitover --- DEVELOPER-MANUAL.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/DEVELOPER-MANUAL.md b/DEVELOPER-MANUAL.md index 7c58d6c9..f342f039 100644 --- a/DEVELOPER-MANUAL.md +++ b/DEVELOPER-MANUAL.md @@ -223,6 +223,9 @@ Install some chocolatey packages: choco install -y visualstudio2019community --params '--locale en-US' choco install -y visualstudio2019-workload-nativedesktop choco install -y hackfont dejavufonts ripgrep git gpg4win microsoft-windows-terminal powershell-core vim neovim zip unzip notepadplusplus diffutils ntop.portable grep gawk sed less transifex-client +# Copy your .ssh over to your profile directly first preferrably: +stop-service ssh-agent +sc.exe delete ssh-agent choco install -y openssh --params '/SSHServerFeature /SSHAgentFeature /PathSpecsToProbeForShellEXEString:$env:programfiles\PowerShell\*\pwsh.exe' ``` @@ -574,6 +577,18 @@ Then run: restart-service sshd ``` +If you've installed openssh before copying over your `~/.ssh`, you will need to +fix permissions on your `authorized_keys` files, the easiest way to do +that is to re-run the installer with `--force`: + +```powershell +choco install -y --force openssh --params '/SSHServerFeature /SSHAgentFeature /PathSpecsToProbeForShellEXEString:$env:programfiles\PowerShell\*\pwsh.exe' +``` + +If you need to fix permissions on your private key, follow these instructions: + +https://superuser.com/a/1329702/226829 + #### PowerShell Usage Notes PowerShell is very different from unix shells, in both usage and programming.