Calling unix shell script from c?

SharpSsh - A Secure Shell (SSH) library for . NET Update Refer to the developer's site for SharpSSH for more information on how to use the tool.

I have checked this. This seems to be promising. But as the author mentioned its not complete.

We are getting error when connecting to remote machine. We are trying to solve this out. – Hari KRK Jun 3 at 4:22 @Hari KRK, let us know if the issue has been resolved.

– OnesimusUnbound Jun 4 at 0:15 We tried out, but unable to solve the issue. We are getting timed out error when connecting to remote machine. – Hari KRK Jun 6 at 9:33 We tried out, but unable to solve the issue.

We are getting timed out error when connecting to remote machine. – Hari KRK Jun 7 at 5:43 have you accessed the sharpSsh's author site – OnesimusUnbound Jun 7 at 5:48.

A straight forward way of preforming this using System.Diagnostics. Process // Start the child process. Process p = new Process(); // Redirect the error stream of the child process.P.StartInfo.

UseShellExecute = false; p.StartInfo. RedirectStandardError = true; p.StartInfo. FileName = "Write500Lines.

Exe"; p.Start(); // Do not wait for the child process to exit before // reading to the end of its redirected error stream. // p.WaitForExit(); // Read the error stream first and then wait. String error = p.StandardError.ReadToEnd(); p.WaitForExit().

Thanks Terrance. The C# application runs in a windows environment and I need to connect to remote unix box to execute the shell script there. Is there any direct method for this?

– Hari KRK Jun 3 at 4:21.

Even I had the same problem, I have googled for solution for around 1 month. Finally, I have decided to use plink. Exe (command line version of putty.

Exe) to connect to unix box and execute a script there. You have to use plink through c# process, I have tried it and this works amazingly. But rite now the problem I am facing is when I am running a script from c# process I am unable to pass arguments to that script.

Probably it would be rite to say that I do not know how to do that. Regards -Aakash.

As OnesimusUnbound told check out sharpSSH from the orginal site, tamirgal. Com/blog/page/SharpSSH. Aspx – Hari KRK Jun 14 at 4:34 Yes Hari, but I I liked the plink rather than SharpSSH, plink is more stable.

– Akash Jun 14 at 6:56.

As OnesimusUnbound told check out sharpSSH from the orginal site, tamirgal.com/blog/page/SharpSSH.aspx this is really nice..

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions