Currently I am writing a build script for a UNIX application which needs to be built for Windows using the Cygwin environment. I quickly got tired of working inside the default Cygwin window (which doesn’t even have proper copy & paste), so I installed a SSH server to work on the Cygwin environment remotely:
-
First of all, you need to install the SSH package using the Cygwin installer. If you already installed Cygwin don’t worry, just re-run the installer and you’ll be fine. When you reach the “Select Packages” section, just enter
sshinto the search field, open the “Net” section and select the “openssh” package. -
Now make sure that your Cygwin shell is started in administrative mode, by right-clicking the Cygwin icon and selecting
Run as administrator. -
In your shell, run
ssh-host-config -ywhich will create the necessary configuration files for your SSH server. -
Set a password for your account (which you will connect to via SSH) by running
passwd. If you are unsure which is your username, just runwhoami. -
Now you can start your server by running
cygrunsrv --start sshd