Click here to Skip to main content
15,900,906 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I'm trying to give command in windows (cpp) and pass the command to linux machine connected in lan. where the command is executed and the result must be displayed here again in windows.

Please tell me If you have an idea to this..

Thanks and regards,

Yugeshkumar V
Posted

Have you heard about Secure Shell[^] yet? What about Telnet[^]? Doesn't that ring any bells?

Also here on CP dwell many genious people. Need proof?

How's that for starters: sharpSsh - A Secure Shell (SSH) library for .NET[^]. And just to make sure this wasn't a spurious hit I ask you to consider this tidbit as well: Quick tool : A minimalistic Telnet library[^].

Enjoy!

—MRB
 
Share this answer
 
v2
Comments
Richard MacCutchan 30-Sep-11 13:10pm    
Good answer and links, have a 5.
Write a server for the linux system and write a client for the windows system and have the client connect to the server trough TCP or UDP?
 
Share this answer
 
Comments
Manfred Rudolf Bihy 30-Sep-11 7:21am    
Unix systems already come with a plethora of services that can be consumed via network. There really is no need to write something of your own unless you are after something quite exotic. The problem is more on the windows side trying to find a suitable library that will enable you to communicate with the unix system.
Code-o-mat 30-Sep-11 7:39am    
Without knowing anything specific about your problem it won't be easy to guess for a solution. Based on that i gave a generic one. If what you want to do would work using SSH and a terminal, then i suggest looking for ways to establish an SSH connection (Google is your friend) with the linux machine and sending the command, there's a great tool, Putty[^] whose source code is available for download, maybe checking into it could reveal some usefull things.
Manfred Rudolf Bihy 30-Sep-11 8:46am    
You seem to confuse me with OP, which in turn has me confused now. :=D

;)
Code-o-mat 30-Sep-11 8:58am    
Ow, sorry, i really thought your message came from the original poster. My bad. This quick-answer system confuses me a bit.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900