Sending commands from Ubuntu to Windows

You reminded me about winexe:

Download the tarball from the project page at http://sourceforge.net/projects/winexe/

wget "http://downloads.sourceforge.net/project/winexe/winexe-1.00.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fwinexe%2F&ts=1377024055&use_mirror=hivelocity"

I'm using a hot link for illustrative propose.

  1. Untar the file:

    tar zxf winexe*.tar.gz
    cd winexe*
    
  2. Configure it:

    ./autogen.sh
    ./configure
    
  3. Make it:

    make
    

Then you can either install it, or running it with ./winexe:

./winexe  -U "Administrator" //some-pc 'shutdown.exe'

It follows the same syntax as psexec Microsoft tool.


If you install cygwin on windows machines, and also install sshd, then you will be able to give any remote commands through ssh. From windows to linux you can give remote commands through putty (ssh).