I am developing a C# application from which I need to execute a process in a Unix machine remotely. How I can do this with either PsExec or Windows Management Instrumentation.
Asked
Active
Viewed 496 times
1 Answers
0
Both WMI and PSExec rely on Windows-specific APIs and services. Look at Secure Shell (ssh) instead. See C# Library for SSH and Telnet or SSh client in C# .net for C# libraries for using SSH.
-
Tell me one thing, Can i use this library from web application? – mlg Sep 20 '12 at 11:56
-
@MidhunlalG You can but the connection may take some time to authenticate and the process to execute. This may exceed the time out for request handling. Was there a particular reason or problem you were thinking of? – akton Sep 20 '12 at 11:59
-
The basic idea is I have a web page and on a button click in the page, I need to execute a script located in the Unix machine. – mlg Sep 20 '12 at 12:04
-
@MidhunlalG Then, as long as the web app has access to the credentials needed to authenticate to the target system and the script does not take too long, you should be fine. – akton Sep 20 '12 at 12:08