Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
i want to open a cmd.exe of a remote machine in my own machine.. i am using c language..its just for educational purpose..can any one give me some idea..
no actually my approach is very simple.. my server code will in one machine and client code will be in the remote machine. now when the client code will be executed its cmd should be open in my machine so that i can access that remote machine..i am able to make connection with the remote machine..
Yes, your server application (which run commands, for example cmd.exe) must be on the remote machine. And your client application, your virtual cmd.exe, will connect to that server. You must have access to execute own files on this remote machine and run your server application there. Therefore I ask about that. If you haven't that access you can't do it - maybe by hacking, but this forum is not for that.
To compile programs for Windows, you can do it on the Windows by DevCpp or other compiler, or do it on the Linux under wine, or more uncomfortably using cross compilation. I suggest one of two first.
sorry i am not getting how to access it.. till now i am just able to open cmd prone in the remote machine from server side... but i have to get the control of that cmd prone in my server machine..dont know how to do it?
can we do something like this, if it is possible to send the cmd.exe file of client machine from client side to server side, and in server side if we can execute it..i dont know whether it is possible or not..
Well, the idea is quite simple. The server listen connection and when client connect it execute cmd.exe through CreateProcess() As I see this function can define handle to standard input, output and error. I think you can connect it to network socket or memory and then send/receive through connection. On the client side (Linux) you do the oposite: standard output of server conect with standard input of client and vice versa.
ok, before i was using system() to open the cmd.exe..now with createprocess() and able to open cmd.exe in remote side.now you are talking about to send the output of createprocess() to my machine.
i think you are talking about "lpProcessInformation" which is a pointer to a PROCESS_INFORMATION structure that receives identification information about the new process, m i right? but the problem is how to send it using send()..because the "processinformation" is not character type..
hii eSlix finally i have done this using some different approach..i can now access the remote system from my machine, basically i can execute all the DOS based windows command on the remote machine..thank you for your kind advice..
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.