Telnet issue

Hi All!

for lab purposes i need to run telnet server on my RedHat 7 machine.
i installed the package: telnet-server using yum.
i read that i need to edit the telnet file under /etc/xinetd.d
the problem is that there is no telnet file in that folder.
the telnet server install completed successfully what am i missing here?

thanks.
guy

Are you sure you installed the "telnet-server" package and not the "telnet" application only?

Did the installation process also install "xinetd" as dependency?

What's the output of rpm -q xinetd telnet-server ?

Here is what I have:

# rpm -q xinetd telnet-server
xinetd-2.3.14-39.el6_4.i686
telnet-server-0.17-47.el6_3.1.i686
#
# rpm -qc telnet-server
/etc/xinetd.d/telnet
# 

Here is also the original telnet configuration file, which needs to be changed in order to get telnet-server up and running:

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

When you change disable = yes to disable = no, then you just need to start or restart the xinetd service:

# service xinetd restart

---------- Post updated at 07:45 PM ---------- Previous update was at 07:38 PM ----------

An appropriate iptables rule in /etc/sysconfig/iptables might also be required:

-A INPUT -m state --state NEW -m tcp -p tcp --dport 23 -j ACCEPT

Plus restart of the iptables service:

# service iptables restart

but i don't have the telnet file.
see attached print screen

OK. Please run rpm -ql telnet-server and see if a file called /usr/sbin/in.telnetd appears in the output?

If yes, you should try to create /etc/xinetd.d/telnet manually. Make sure this file has same permissions as the other files in the /etc/xinetd.d directory. Also make sure you enable the telnet server in the manually created configuration file and restart xinetd service.

HI

i ran the command: "rpm -ql telnet-server" and there was a file /usr/sbin/in.telnetd in the output. i created the "telnet" file manually and configured disable=no still telnet not working... im going crazy

Did you restart the xinetd service afterwards? Did the restart work without complaints? You say "still telnet not working": How did you test? From another machine? Here is another idea, after you make sure xinetd gets restarted: Run netstat -ant | grep 23 to see if telnet daemon is listening on port 23, it might be that telnetd is listening, but the firewall is blocking remote access. If you think the firewall might be a problem, then test with telnet localhost first before changing fw rules.

It is tempting to just create the file manually, however, I would say that it is worthwhile to find out first why it was not there, since rpm package are very precise.
I would check the content of the files that were supposed to be installed from the repository:

# repoquery --list telnet-server
/etc/xinetd.d/telnet
/usr/sbin/in.telnetd
/usr/share/man/man5/issue.net.5.gz
/usr/share/man/man8/in.telnetd.8.gz
/usr/share/man/man8/telnetd.8.gz

and then I would check with what got installed:

rpm -ql telnet-server
/etc/xinetd.d/telnet
/usr/sbin/in.telnetd
/usr/share/man/man5/issue.net.5.gz
/usr/share/man/man8/in.telnetd.8.gz
/usr/share/man/man8/telnetd.8.gz

Both must match, or something unusual happened during the installation.
That would give me a base to start working out what's going on.

It is just a thought.

see attach

The attachment shows you are running RHEL 7 (which you said in your first post, but I did not pick the thread from beginning)

Things are a bit different with RHEL 7 which explains why you did not have a /etc/xinetd.d/telnet

All you need to enable telnet-server after you install the package (which you did) is the following:

# start the service using systemd facility
systemctl start telnet.socket

# enable the telnet service on boot (permanent)
systemctl enable telnet.socket

# allow the service through the firewall
firewall-cmd --permanent --add-service=telnet
firewall-cmd -reload

If you want to try, undo whatever manual changes you did previously.

IT WORKS!!!!
THANKS!!!!