Julien Poulin
Julien Poulin

Reputation: 13015

How can I issue a command to a linux system via c#?

Using C#, I need to send a date command to set the time on a linux system.

How can I connect to this system and send this command in code?

What library can I use to do this?

Update: I'm really looking for a free solution, thank you...

Upvotes: 1

Views: 2704

Answers (4)

Sangjin Yun
Sangjin Yun

Reputation: 311

Try to use Mono(http://mono-project.com/Writing_a_WebService). You can simply implement web service same way on Windows.

Upvotes: 0

You need some SSH component for .NET to access the remote system. There are plenty on the market, from free (and outdated) SharpSSH to our SSHBlackbox.

Upvotes: 0

Daniel Hilgarth
Daniel Hilgarth

Reputation: 174279

I suggest using the SharpSSH library: http://sourceforge.net/projects/sharpssh/

Upvotes: 4

BugFinder
BugFinder

Reputation: 17858

You could use ChilkatDotNet components to ssh/telnet to your linux box, and run the command - otherwise you would need a client app to sit and listen.

http://www.chilkatsoft.com/downloads_DotNet.asp

Upvotes: 1

Related Questions