Linux – Having to restart xinetd service to connect via telnet

centos5linuxtelnet

In my environment I have a linux server running CentOS 5. I have setup a telnet service on this server in order to connect via telnet. However, after some time I try to connect and I get this error: This session is no longer connected.

Once I restart the xinetd service, this message goes away and I am able to once again telnet in. Any ideas on how I can debug this issue or what logs I can check out to see what may be causing this error? Thanks in advance for any advice or help you can recommend.

Best Answer

Your telnet service messages will appear in /var/log/messages. The service is very stable under RHEL/CentOS. There's a chance that this could be an issue with your clients. Grep your log output for something like the following:

Jul 19 21:17:59 NOT-brazzers telnetd[4939]: ttloop: peer died: EOF

I'm in a similar situation, having to support legacy client/server software that relies on telnet access. For my EL5 systems, the telnet configuration file looks like the following. Restart the xinetd service to apply any changes:

/etc/xinetd.d/telnet

# 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
        instances       = UNLIMITED
        per_source = UNLIMITED
}