OpenSSH SSHD Setup on Cygwin (1.3.20) Table of Contents (TOC): ================================================================ 1. Removal of service and backing up of old config files 2. Installing service/default config files 3. Fixing permissions for privsep and SCM related files Removal of service and backing up of old files ================================================================ Before installing the sshd service you should make sure that you have made a backup copy of your old configuration files and log files (if they exist). Run the following commands from a root prompt: # mkdir -p /var/tmp/sshd && chown -R root:root /var/tmp/sshd # chmod -R u=rwx,go-rwx /var/tmp/sshd # tar cf /var/tmp/sshd/old-cfg.tar /etc/ssh* # cygrunsrv -E sshd; cygrunsrv -R sshd Installing service/default config files ================================================================ Now your ready to install the service. Run the following commands from a root prompt: # ssh-host-config -y Fixing permissions for privsep and SCM related files ================================================================ Now you need to fix-up some permissions for the files that sshd will need to access/write to. Run the following commands from a root prompt: # [ -f /var/log/sshd.log ] && mv /var/log/sshd.log /var/log/sshd.log.old # touch /var/log/sshd.log # chown system:system /var/log/sshd.log /var/empty /etc/ssh_h* # chmod go-rwx /etc/ssh_host*_key # chmod 755 /var/empty All Done!!! Now your ready to start sshd: # cygrunsrv -S sshd If that results in an error, then check out the contents of /var/log/sshd.log , which may give you some clues.