Verify DOS environment using Command Prompt: C:\>echo %CYGWIN% ntsec tty C:\>path PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\cygwin\bin Start a Cygwin Bash shell. Stop and remove sshd service: dpchrist@p42800e:~$ cygrunsrv -E sshd dpchrist@p42800e:~$ cygrunsrv -R sshd Remove sshd log: dpchrist@p42800e:~$ rm /var/log/sshd.log rm: remove write-protected file `/var/log/sshd.log'? y Install sshd using ssh-host-config script: dpchrist@p42800e:~$ ssh-host-config Overwrite existing /etc/ssh_config file? (yes/no) yes Generating /etc/ssh_config file Overwrite existing /etc/sshd_config file? (yes/no) yes Privilege separation is set to yes by default since OpenSSH 3.3. However, this requires a non-privileged account called 'sshd'. For more info on privilege separation read /usr/share/doc/openssh/README.privsep. Should privilege separation be used? (yes/no) yes Generating /etc/sshd_config file Warning: The following functions require administrator privileges! Do you want to install sshd as service? (Say "no" if it's already installed as service) (yes/no) yes Which value should the environment variable CYGWIN have when sshd starts? It's recommended to set at least "ntsec" to be able to change user context without password. Default is "ntsec". CYGWIN=ntsec tty The service has been installed under LocalSystem account. To start the service, call `net start sshd' or `cygrunsrv -S sshd'. Host configuration finished. Have fun! Start sshd service: dpchrist@p42800e:~$ cygrunsrv -S sshd Test it: dpchrist@p42800e:~$ ssh localhost dpchrist@localhost's password: Last login: Sat Nov 27 22:19:44 2004 from 192.168.1.246 dpchrist@p42800e:~$ exit logout Connection to localhost closed. Look at sshd log: dpchrist@p42800e:~$ cat /var/log/sshd.log Reboot. Try to log in: dpchrist@p42800e:~$ ssh localhost ssh_exchange_identification: Connection closed by remote host Look if sshd is running: dpchrist@p42800e:~$ ps -a PID PPID PGID WINPID TTY UID STIME COMMAND 1952 1 1952 1952 ? 18 08:25:36 /usr/bin/cygrunsrv 2044 1 2044 2044 ? 18 08:25:36 /usr/bin/cygrunsrv 196 1952 196 244 ? 18 08:25:37 /usr/sbin/cron 204 2044 204 252 ? 18 08:25:42 /usr/bin/exim-4.43-1 904 1 904 904 ? 18 08:25:40 /usr/bin/cygrunsrv 952 904 952 1012 ? 18 08:25:41 /usr/sbin/sshd 3004 1 3004 3004 0 1003 08:26:11 /usr/bin/bash 3572 3004 3572 3584 0 1003 08:26:41 /usr/bin/ps dpchrist@p42800e:~$ cygrunsrv -Q sshd Service sshd exists Type : Own Process Current State : Running Controls Accepted : Accept Stop Windows Services indicates "CYGWIN sshd" has status "started", Startup Type "Automatic", and Log On As "Local System". /var/log/sshd.log has a clue: dpchrist@p42800e:~$ cat /var/log/sshd.log 3 [main] sshd 952 fork_copy: linked dll data/bss pass 0 failed, 0x3DB000..0x3DB050, done 0, windows pid 3484, Win32 error 487 Windows Task Manager shows no process with PID 3484. Manually stop and start sshd: dpchrist@p42800e:~$ cygrunsrv -E sshd dpchrist@p42800e:~$ cygrunsrv -S sshd dpchrist@p42800e:~$ ssh localhost dpchrist@localhost's password: Last login: Sun Nov 28 08:23:05 2004 from localhost