Msg#: 3431308 posted 3:56 pm on Aug 24, 2007 (gmt 0)
Does anyone know how I can execute a DOS command on a Windows machine (for which I have the username and password of course ;) ) from a remote Linux box? This would be equivalent to ssh-ing in to a Linux machine from another one and executing a program.
Msg#: 3431308 posted 4:54 am on Aug 25, 2007 (gmt 0)
Telnet is one option but can be a bit of a hassle to setup. Another option would be to use a VNC client of some sort.
Microsoft now offers PsExec [microsoft.com] from their acquistion of Sysinternals.
Utilities like Telnet and remote control programs like Symantec's PC Anywhere let you execute programs on remote systems, but they can be a pain to set up and require that you install client software on the remote systems that you wish to access. PsExec is a light-weight telnet-replacement that lets you execute processes on other systems, complete with full interactivity for console applications, without having to manually install client software.
Msg#: 3431308 posted 5:30 am on Aug 30, 2007 (gmt 0)
Thanks for the suggestions bill. Turns out (ironically) that it is possible to do it by setting up Cygwin to enable SSH logins, logging in via ssh, creating a batch file and then executing that batch file. You may or may not need to create the batch file but in my case it seemed to be necessary. See: [pigtail.net...]
And use ssh-keygen to make ssh keys so that it doesn't prompt for a password, e.g.:
Msg#: 3431308 posted 8:07 am on Aug 30, 2007 (gmt 0)
I totally forgot cygwin. <doh> I run that on my home machines to maintain some personal websites. It's a powerful tool, but there's quite a learning curve if you're not familiar with the *nix command line.