Linux Telnet Failing

JohnKennington
JohnKennington used Ask the Experts™
on
Hi,

I cannot get telnet working on a RedHat 9.0 system.  Here is the error message:

Connecting To 192.168.0.191...Could not open connection to the host, on port 23
 Connect failed


Here is my telnet file contents:

# default: on
# description: The telnet server serves telnet sessions; it uses \
#      unencrypted username/password pairs for authentication.
service telnet
{
      disable            = no
      flags            = REUSE
      socket_type      = stream        
      wait            = no
      user            = root
      server            = /usr/sbin/in.telnetd
      log_on_failure      += USERID
}

Firewall is off, so port 23 is open.

any help would be appreciated.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2005

Commented:
On the server, what happens if you do 'telnet localhost? If that works the problem is most likely to be a firewall. The default firewall on a RedHat 9 box wiuld use IPtables, so '/sbin/iptables -L' should only show ACCEPT for all chains.
Top Expert 2006

Commented:
Another thing to check - is the telnetd even running?

ps -ef | grep telnetd

..in which case, you'll need to start it up:)

/etc/init.d/telnetd start

HTH:)

Commented:
The best way to debug this issue would be to edit your  /etc/syslog.conf and type in the following

*.*                                            > /dev/tty12

save it and restart your syslog service (type in /sbin/service syslogd restart). Also restart your xinetd (/sbin/service xinetd restart). Once that is done

try telneting again. Than press Alt-F12 on your linux box to see the error. you probably can resolve the issue yourself. Most likely telnetd is not installed. Type in "rpm -q telnetd" to make sure it is installed.

Thanks
Announcing the Winners!

The results are in for the 15th Annual Expert Awards! Congratulations to the winners, and thank you to everyone who participated in the nominations. We are so grateful for the valuable contributions experts make on a daily basis. Click to read more about this year’s recipients!

Commented:
Don't know how this is on RH (9.0), but isn't telnet started via inetd/xinetd? Check your /etc/(x)inetd.conf.

A.

Author

Commented:
I gave up on this and decided to use ssh instead.  It connects fine.  For some reason, telnet will not work.

Commented:
There might be multiple problems:

1. The xinetd is not configured properly.
2. The ptys are not mounted in /etc/fstab file.
3. There are no ptys on your machine.
4. The firewall is not allowing it.

If ssh is working, its better than telnet anyday ;)
Lead Sales Engineer - Public Sector
Commented:
Unless you explicitly installed, configured, and enabled the telnet daemon, RH9 does not use it by default.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial