by admin on April 19, 2006 05:42pm
Running Command Line Applications on Windows XP/2000 from a Linux Box:
Sent: Thursday, April 13, 2006 2:35 PM
To: Port25 Feedback
Subject: (Port25) : You guys should look into _____
Can you recommend anything for running command line applications on a Windows XP/2000 box from within a program that runs on Linux? For example I want a script to run on a Linux server that will connect to a Windows server, on our network, and run certain commands.
One way to do this would be to install an SSH daemon on the Windows machine and run commands via the ssh client on the Linux machine. Simply search the web for information on setting up the Cygwin SSH daemon as a service in Windows (there are docs about this everywhere). You can then run commands with ssh, somewhat like:
ssh administrator@<hostname> 'touch /cygdrive/c/blar'
That will create a file in C:\ called "blar". You can also access Windows commands if you alter the path in the cygwin environment or use the full path to the command:
ssh administrator@<hostname> '/cygdrive/c/windows/system32/net.exe view'