From 6cf40e0a89368b76a1e2f39259fe72827416c5ec Mon Sep 17 00:00:00 2001 From: manojampalam Date: Tue, 17 May 2016 18:51:22 -0700 Subject: [PATCH] Updated Install Win32 OpenSSH (markdown) --- Install-Win32-OpenSSH.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Install-Win32-OpenSSH.md b/Install-Win32-OpenSSH.md index aab3343..405c716 100644 --- a/Install-Win32-OpenSSH.md +++ b/Install-Win32-OpenSSH.md @@ -6,16 +6,6 @@ * `cd 'C:\Program Files\OpenSSH-Win32'` * Setup SSH host keys (this will generate all the 'host' keys that sshd expects when its starts) * `.\ssh-keygen.exe -A` -* Secure SSH host keys - * `net start ssh-agent` - * download psexec from [here](https://technet.microsoft.com/en-us/sysinternals/psexec.aspx) - * launch cmd.exe as SYSTEM - `psexec.exe -i -s cmd.exe` - * register host keys in above cmd.exe - * `ssh-add ssh_host_dsa_key` - * `ssh-add ssh_host_rsa_key` - * `ssh-add ssh_host_ecdsa_key` - * `ssh-add ssh_host_ed25519_key` - * host private keys are now securely stored by ssh-agent, private key files can be removed at this point. * Open Firewall * `New-NetFirewallRule -Protocol TCP -LocalPort 22 -Direction Inbound -Action Allow -DisplayName SSH` * If you need key-based authentication, run the following to setup the key-auth package @@ -33,6 +23,16 @@ ``` netsh advfirewall firewall add rule name='SSH Port' dir=in action=allow protocol=TCP localport=22 ``` +* Secure SSH host keys + * `net start ssh-agent` + * download psexec from [here](https://technet.microsoft.com/en-us/sysinternals/psexec.aspx) + * launch cmd.exe as SYSTEM - `psexec.exe -i -s cmd.exe` + * register host keys in above cmd.exe + * `ssh-add ssh_host_dsa_key` + * `ssh-add ssh_host_rsa_key` + * `ssh-add ssh_host_ecdsa_key` + * `ssh-add ssh_host_ed25519_key` + * host private keys are now securely stored by ssh-agent, private key files can be removed at this point. ## Uninstall Win32 OpenSSH