- Download SSH binaries from https://github.com/PowerShell/Win32-OpenSSH/releases/
- Extract the archive to
C:\Program Files\OpenSSH
- Open powershell as an administrator
- CD to directory where OpenSSH was extracted:
cd c:\Program Files\OpenSSH
- Install OpenSSH
powershell.exe -ExecutionPolicy Bypass -File install-sshd.ps1
- Generate server keys and restrict access to them
.\ssh-keygen.exe -A
- Open a port for SSH in the firewall:
New-NetFirewallRule -Protocol TCP -LocalPort 22 -Direction Inbound -Action Allow -DisplayName SSH
- Start the
sshd
service and configure it for automatic start - In powershell, CD to the user's home directory
cd c:\users\{user}
- Create a directory for ssh key data:
mkdir .ssh
- Allow the ssh service access to the directory `icacls C:\users{user}.ssh /grant "NT Service\sshd:R" /T
Created
June 21, 2017 10:53
-
-
Save cyrex562/148bd587fef5c10d9a2c111294df5bb8 to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment