development blog for the wicked stuff we encounter

1) Download Cygwinx64 installer 2) Run the installer, and add the packages:
Net->OpenSSH
Admin->Cygrunsrv
All other prerequisites will be selected automatically. 3) Run Cygwin terminal as administrator 4) Run the command
ssh-host-config -y
5) Create a unique windows user for uploads with Server Manager 6) To let Cygwin 'see' the new user, run:
mkpasswd --local > /etc/passwd
mkgroup --local > /etc/group
7) Create /home/newuser/.ssh folder, and upload / generate keys for the new user. Don't forget authorized_keys from the repository.  8) Login as the new user, and run the following:
chmod 700 .ssh
chmod 600 .shh/authorized_keys
 
9) Edit /etc/sshd_config (I usually use the following settings):
Port 22
AuthorizedKeysFile .ssh/authorized_keys
PasswordAuthentication no
PermitEmptyPasswords no
UsePrivilegeSeparation sandbox 
10) Restart sshd via mmc -> Services