- Run the CygWin installer and make sure that
opensshis installed from the 'Net' category, andcygrunsrvis installed from the 'Admin' category (the installer can be automated with command-line arguments) - Run CygWin as an Administrator and run
ssh-host-config(this is abashscript, so you can make a similar script with the options you'd like pre-selected) - Note that if the machine is bound to a domain controller, local users won't be allowed to log in via SSH. More details on that here.
- Generate an SSH key on your host with
ssh-keygen -t rsa, then append the contents of the public key to~/.ssh/authorized_keysfor the guest's SSH user - You can now do a password-less login with
ssh -i /path/to/.ssh/id_rsa ssh_user@windows_machine
When everything's done, you may want to add C:\cygwin64\bin\ to the end of your PATH (at the beginning it may override Windows default utilities with the same name). Any programs with an exe extension in that folder should work. When in doubt, you can always run bash from within CMD.EXE.
Another thing to note is that you can use the Windows native Python from within CygWin. When using the python command, the window appears to hang, but that's because Python can't recognize the console so it goes into non-interactive mode. To remedy this, launch the interpreter with python -i.