reinstalling sshd service in windows

This one was a bit painful as I didn’t want to mess with the pre-existing configuration of the key files. Installation required a small modification to the standard installation options.

cygrunsrv --install sshd --path '/usr/sbin/sshd' --env 'PATH=/bin;/sbin' --env 'CYGWIN=ntsec tty' -a -D

You need to use the cygwin –path item, otherwise the service won’t start correctly (sshd needs to be executed with an absolute path). The env flags are there to allow the service to start, otherwise you end up with an annoying: cygcrypt-0.dll cannot be found error. The CYGWIN environment was there because otherwise it doesn’t work correctly. the -D is for daemon mode.

[Listening to: Butterfly Caught – Massive Attack – 100th Window (7:34)]