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?
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
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.
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: