
How to connect to Unix using VB
: Can anyone tell me how to connect to Unix machine and execute Unix
: commands using Visual Basic (is that possible after all? if not why?).
: Thanks in advance
It is possible, by using the Winsock control, connecting to the telnet
port (23), logging in, etc.
However, this setup would not be terribly secure for the same reason
that telnet itself isn't: anyone on the network can determine the
password as it travels over the wire as plain text. This may not be a
problem if you have only a few people on your network, trust them all,
and aren't connnected to the Net. If any of those things is not the
case, though, then I couldn't in good conscience recommend it.
A more secure approach would be to write a server process on the Unix side
and send commands to that process via a socket. The server process
would authenticate the request (ideally through some type of encrypted
challenge-response protocol) and, after verifying that it was from an
authorized address and user, carry out the command on your behalf.
This could be as simple as a few lines of perl, or as complex as a
CORBA ORB, depending on your application's needs.
Joe