Operating System - Linux
1752291 Members
4898 Online
108786 Solutions
New Discussion юеВ

Re: HP-UX 11.11 Talking to telnet from a C Program

 
David Johns
Advisor

HP-UX 11.11 Talking to telnet from a C Program

Hello:

We are trying to talk to telnet from a C program without much luck. Does anyone have any tips on why it isn't working? Simply opening a socket on the telnet port and writing works, but the read hangs. This is during the authentication process. On machines without authentication the program works nicely.

Thanks,
-Dave

P.S. Help!
5 REPLIES 5
paolo barila
Valued Contributor

Re: HP-UX 11.11 Talking to telnet from a C Program

strange thing,
telnet is interactive,
I don't get your point.
If you wanna copy files you should go
with ftp or better scp...
try to explain better please
share share share
Michael Goltsman
New Member

Re: HP-UX 11.11 Talking to telnet from a C Program

Have you tried Perl instead of C? Perl has the NET::Telnet module for interaction with telnet service.

You can find modules for SSH too.
Muthukumar_5
Honored Contributor

Re: HP-UX 11.11 Talking to telnet from a C Program

what you are trying to use with c program to telnet? It is better use perl modules of NET::Telnet always for automation or any testing purpose.

--
Muthu
Easy to suggest when don't know about the problem!
Muthukumar_5
Honored Contributor

Re: HP-UX 11.11 Talking to telnet from a C Program

Use this perl module.

http://search.cpan.org/~jrogers/Net-Telnet-3.03/lib/Net/Telnet.pm

--
Muthu
Easy to suggest when don't know about the problem!
Arunvijai_4
Honored Contributor

Re: HP-UX 11.11 Talking to telnet from a C Program

Hi Dave,

Try running the program under tusc utility and see where it hangs (on what system call). It could be some read/write buffer issues.

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"