Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to run commands on remote unix machines over SSH?

Status
Not open for further replies.

tg2003

IS-IT--Management
Feb 6, 2003
270
IL
Hi,
Is there an API/SDK/dll that lets me run commands on remote machine over SSH, by a command-line?

I'm aware to the option of open a shell and run 3rd party applications, but it has some performance overhead...

Thanks in advance!
 
Here is one wodSSH ActiveX component.

You might also try Catalyst and others.


Oh! You want free? Good luck!

BTW I automate an instance of PLink.exe via anonymous pipes all of the time for this. I really don't think the performance is that bad, though sure I'd prefer something more tightly coupled.

Considering this is what passes for a "component technology" in *nix though you won't be any worse off.
 
Have a look at cygwin - they have openssh. It may use some dlls which you could incorporate into your program.
 
Speaking about Cygwin: you can call cygwin (bash) scripts from the DOS command line (use the shell function), by executing code like:

Code:
c:\cygwin\bin\bash --login ~/yourscript.sh someparameter

I did this trick to test scripts that would run on Linux in production, but were developed on Windows. Remember that you will have to translate paths if you use Cygwin.
 
A note if you are using openssh. Either use openssh by itself or the version from cygwin. The version of cygwin dll is normally not compatible with cygwin or any other cygwin based compiler (gcc, gfortran, g95 etc). You'll just end up with no end of problems if you mix the two.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top