Quick & Easy: Cygwin SSHD and Cron

Quick & Eeasy returns in Windows flavour

SSHD Server

sshd-host-config

  • Should StrictModes be used? (yes/no) yes
  • Should privilege separation be used? (yes/no) yes
  • Enter the value of CYGWIN for the daemon: [] press enter
  • Do you want to install sshd as a service? yes
  • Do you want to use a different name? (yes/no) no
  • Please enter the password for user 'cyg_server: `enter your password
  • mkpasswd -l -u cyg_server >> /etc/passwd
  • chown cyg_server /var/empty
  • chown SYSTEM /var/empty
  • chmod 600 /var/empty
  • net start sshd
  • Now you can login with your username/password with xshell or your favorite ssh client

Crontab

  • cygrunsrv -I cron -p /usr/sbin/cron -a -D
  • export Editor="nano"
  • crontab -e
  • net start cron

tips

  • net start to start service
  • net stop to stop service
  • sc delete <service> to delete service
  • cat /var/log/sshd.log to read sshd log
  • cat /var/log/cron.log to read cron log

Todo:

add host keys guide to sshd

Sources (sshd), larsavery, dbaportal
Sources (cron), stockoverflow