Operating System - Linux
1832220 Members
2585 Online
110041 Solutions
New Discussion

Re: script doesn't work using port 23 in inetd.conf

 
yc_2
Regular Advisor

script doesn't work using port 23 in inetd.conf

Hi,

I have written an expect script using service port number 5000, it works fine.

The final goal of the script is to use port 23. After I changed the script's service port number to 23 and did a refresh of inetd. The telnet client will not be able to connect to the server, it just hang with a blank screen.

Any pointer is appreciated.


YC
8 REPLIES 8
Patrick Preuss
Trusted Contributor

Re: script doesn't work using port 23 in inetd.conf

Hi,
have you set the entrie in the inetd.conf in this way
telnet stream tcp nowait /usr/sbin/tcpd /path/to/my/script
so the tcp warper is used?

have you set the screen size and the TERM type so that expect can determine it?

best regards
Patrick
Goodbye Douglas! Whereever you are now, keep your towel and don't panic.
yc_2
Regular Advisor

Re: script doesn't work using port 23 in inetd.conf

Hi,

The script had been tested using service port 5000 and worked fine.

When I tried it using port 23, I actually inter-change port 5000 and 23. A freshed of inetd was also performed.


Rgds,
YC
Patrick Preuss
Trusted Contributor

Re: script doesn't work using port 23 in inetd.conf

Have you disabled telnetd on port 23? i'm useing an dump script on port 23 that does nothing and it works fine!-)

hope it helps a bit
Goodbye Douglas! Whereever you are now, keep your towel and don't panic.
yc_2
Regular Advisor

Re: script doesn't work using port 23 in inetd.conf

Hi,

Appreciate if your advice on how to disable telnetd.

I thought the way I did will swop the telnetd port to 5000.


YC
yc_2
Regular Advisor

Re: script doesn't work using port 23 in inetd.conf

Hi,

Appreciate if you can advice on how to disable telnetd.

I thought the way I did will swop the telnetd port to 5000.


YC
yc_2
Regular Advisor

Re: script doesn't work using port 23 in inetd.conf

Hi,

I've found out why the script doesn't work when I changed its port number to 23 and telnet port to 5000. This is because within my script, it telnet to another host. When the telnet port changed to 5000, then the telent within the script will not work.

Is there a work around ?


YC

Re: script doesn't work using port 23 in inetd.conf

Hi
Within the script use the port no along with telnet

telnet host portno.
e.g.;

telnet 153.11.199.32 23

This should work ..

Manoj