User Tools

Site Tools


cygwin_ssh_server_for_windows

This is an old revision of the document!


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.

$ chmod +r  /etc/passwd
$ chmod +r  /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  or chown sshd_server /var/empty

User setup

Make sure every Windows user has a password set. Then:

$ mkpasswd   -cl   >   /etc/passwd
$ mkgroup   --local    >   /etc/group
cygwin_ssh_server_for_windows.1223163982.txt.gz · Last modified: 2008/10/04 16:46 by tkbletsc

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki