This is an old revision of the document!
Table of Contents
A shorter version of this very verbose HOWTO.
User setup
All users MUST have passwords. Login as an administrator.
Install CYGWIN
Download cygwin's setup.exe from http://www.cygwin.com/ and save it somewhere with a fair bit of space. All the package tarballs will be saved there. Run setup.exe.
Set the "Root Directory" to where you want to install cygwin, e.g. "C:\Program Files\cygwin". Set "Install For" to "All Users".
Set "Local Package Directory" to the place where you saved setup.exe.
Pick a mirror; "http://mirrors.kernel.org" is always good.
On the giant package selector, pick (at least):
- openssh
- zlib
- diffutils
You can get an alphabetical package list by clicking the little View button for "Full" view.
Install.
Setup
Right click My Computer, Properties, Advanced, Environment Variables.
Click the "New" new button to add a new entry to System variables:
CYGWIN=ntsec tty
Edit the global PATH environment variable to add the 'bin' directory under where you installed cygwin:
;c:\Program Files\cygwin\bin
Open a cygwin shell. If running something with UAC, run the cygwin shell as administrator (right click, run as administrator).
$ chmod a+r /etc/passwd /etc/group $ chmod 777 /var $ ssh-host-config -y
If the script asks you about "privilege separation", "create a local user sshd on this machine", or "install sshd as a service", answer yes.
If it asks for environment variable "CYGWIN", answer "ntsec tty"
Start it up:
$ net start sshd
or
$ cygrunsrv --start sshd
If the service fails to start, try:
$ chown system /etc/ssh* $ chown system /var/empty
As an aside, if you want your drive letters to be available as /c
instead of /cygdrive/c
, do:
$ mount -s --change-cygdrive-prefix /
User setup
Make sure every Windows user has a password set. Then, in a bash shell:
$ mkpasswd -cl > /etc/passwd $ mkgroup --local > /etc/group