Click to See Complete Forum and Search --> : unix remote login from WIN C++ App ??


bitznbytez
September 13th, 2002, 10:46 AM
I need to figure out a way to login to a unix box and run shell scripts from a C++ application running on a PC (WIN 2000). The unix box and PC are on a standard TCP/IP ethernet network. I have searched all over the internet and found nothing. Any suggestions would be great. Thanks.

Manish Malik
September 13th, 2002, 03:56 PM
There are several options, two of which are:

1. You can run an application on the unix box, listening at a particular port. Your application on the win32 box can connect to it (use sockets), authenticate itself, and then pass on the commands. Remember to run the unix application under a non-root / restricted user.

2. A far easier method would be to use a C++ wrapper for Telnet protocol (google for it), utilize it to telnet to the unix box and run scripts on that box, you want. You may want to opt for SSH if there is sensitive data to be transmitted in this communication.