I have an environment where I can SSH into a Linux machine via Cygwin, but not the other way around due to a security policy out of my control.
I need to automate tasks on the Windows machine but dictate these things to do from scripts or parameters PULL'd from the Linux machine (ie, a watched folder or web service).
How can I structure this so that I can keep an SSH connection open and upon detecting this remote variable change, trigger another Cygwin command on the Windows machine?
An example use case would be browser automation with parameters. While I could do this via a git repo and a recurring script that first syncs with latest code each time before running, I'd like to have more control, such as to force kill the executing thread via passing another variable or shell script down the line.
UPDATE: After all that, there was another method to change the Windows firewall which allowed port 22 connections, so this complicated case will thankfully not be required, but I like the suggestions listed below.
UPDATE: Seems the scenario still exists. Though getting direct access to the system via SSH allowed execution of tasks, these were sandboxed within the SSH user, not the network domain user that I wanted to run GUI tasks in (local Cygwin instance does not have the problems to execute within the domain user's GUI). See my answer below.