|
|

[Cygwin] | [SSHD Setup] |
[SSHD Testing] |
[Uninstall]
Use the following steps to successfully get OpenSSH working as a server:
- Set up your environment for Cygwin. For NT 4 and Windows 2000, this is
done by right-clicking on My Computer and choosing Properties. In NT4,
it's on the Environment tab. In Windows 2000, it's the Environment
Variables on the Advanced tab.
Add the following setting to the System Environment:
Append the following variable to contain the following:
Note that if you are NT/2K on FAT(32), the ntsec option for the
CYGWIN variable won't help you much. In these cases, just set
CYGWIN to "tty". (Note: Through email, I've been notified that
having CYGWIN=ntsec actually does made a difference on FAT(32) systems.
Geoffrey Hoo)
- Download the Cygwin Setup Program
into a temporary folder like C:\CygwinInstall.
- Run "C:\CygwinInstall\Setup.exe", choose " Install
from Internet ", choose a suitable mirror (I like
"ftp://mirrors.rcn.net").
- Now choose the packages you want to install. Click on the "+"
next to "Admin" to expand it. Click on the word "Skip"
next to the word cygrunsrv to install the NT/Win2k/XP Cygwin
Service Initiator. Install cygwin-doc from "Doc",
nano and/or vim from "Editors" and openssh
from "Net".
- [Optional] After Setup is complete, I like to make a couple of changes to
the default installation:
- Download and install ftp://ftp.erdelynet.com/mike/cygwin/profile,
ftp://ftp.erdelynet.com/mike/cygwin/sh_aliases into /etc.
- Change the Cygwin icons so that, instead of pointing to cygwin.bat, they
point to "c:\cygwin\bin\bash.exe --login -i" and start in
"c:\cygwin\bin"
NOTE: Unless specified otherwise, run the following commands within
the Cygwin Bash Shell installed in your Start Menu.
- Now, you'll want to configure sshd. This is MUCH simpler than it used to
be.
Run "ssh-host-config -y" to set it up. This step will
create necessary configuration files, a priviledge separation user and
necessary directories. When prompted with "CYGWIN=" type what you
set CYGWIN to in step 1 (tty ntsec).
- You will probably want to change permissions and ownership on some files:
- cd /; chmod -R og-w .
- chmod og+w /tmp
- touch /var/log/sshd.log
- chown system:system /var/log/sshd.log /var/empty /etc/ssh_h*
- chmod 755 /var/empty
- Now you are ready to start the service:
"cygrunsrv -S sshd"
- Test the service by running "ssh localhost"
Please note that previously, I had instructions that
included running a custom fix permissions script. I have not tested
the script with newer versions of OpenSSH and therefore have left that
information out of the instructions above. If you have any questions, please
direct them to the mailing list
If, at this point, you are unable to connect to your sshd server,
join my SSH-L mailing list for extra help.
If your ultimate goal (like mine was) is to connect to the SSH server with
a GUI client like Putty or
Van Dyke's SecureCRT, now try
that. At this point, also test connecting to your SSH server from a different
machine to ensure network connectivity.
If this is unclear or if you have any questions,
join my SSH-L mailing list.
|