Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Connecting to UNIX from WinNT to run app, and colect data. Best way ??

Posted on 1999-07-25
3
Medium Priority
?
287 Views
Last Modified: 2010-04-21
I wanna write a WinNT app that connect to UNIX then run a UNIX app. The UNIX app will print data to standard output (the screen, if I use telnet). I want the WinNT app to collect these data.

I am thinking of the WinNt app to connect to UNIX via a Telnet port. But is this the BEST way to do this job ????

(1) Is there a better way ?
(2) Better protocol than Telnet, maybe ?
(3) Any libraries to make Telnet easier to program ??? Under WinNT ??? I cant seems to find any.

Thanks.

~templer
0
Comment
Question by:templer122197
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 14

Accepted Solution

by:
chris_calabrese earned 900 total points
ID: 2011640
You can get Telnet to work pretty easily for your task.  Since the telnet protocol is extremely simplistic, you don't need any special software to drive it.  Anything that can open a socket connection will do.  The _easiest_ way to do this is probably to ride on top of 'netcat' (try http://www.l0pht.com/~weld/netcat/), which is a utility for setting up sockets without having to know about sockets programming.

There are some big security drawbacks to Telnet, however.  First, you send the password in the clear.  Second, the fact that you send a password at all means you need to store one in your program (or the registery, etc.).

Another possibility is 'rsh', or Remote SHell, which authenticates by user-name and IP address rather than by password.  Whether this is actually more or less secure depends on a number of factors like how hard it is to spoof IP addresses in your environment, and I wan't get into them all here.  Rsh (which sits on the rcmd authentication protocol) is a bit trickier to program, and there are no bundled libraries/utilities in NT to make it easier.  However, there are a bunch of NT implementations of rsh out there.  For example, all the commercial X-Windows servers seem to come bundled with one.

Finally, if security really is an issue, you probably want to run Secure SHell (SSH) on both the Unix server and the NT client.  See www.ssh.org for info on this option.
0
 

Author Comment

by:templer122197
ID: 2011641
Dear Chris,

Sorry for the very late reply. Thanks for your answers. Thanks a lot. Would appreciate if you could direct me to a free component that does all the 'telnet' job. Thanks again :)

My email is s_templer@rocketmail.com

~templer

0
 
LVL 14

Expert Comment

by:chris_calabrese
ID: 2011642
The telnet is extremely simplistic.  Open the port, send the user name, send the password, then send the command.

If you're doing this in a language that directly supports socket calls (C, C++, perl), it should be easy enough.

Otherwise, you can ride on top of the above-mentioned netcat.

Note:
Strange things may happen if the password's bad, the system prompts you to changed an old password, or some such.  But that's the price you pay for riding on a protocol meant for human interaction instead of one designed for scripting (rsh/ssh).  You can fix this in the Unix world with "expect," but I don't think it runs on NT.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machineā€¦
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consolā€¦
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
Suggested Courses

662 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question