Operating System - Linux
1830165 Members
2327 Online
109999 Solutions
New Discussion

LINUX RH 7.1 - Unable to enable telnet service

 
Danny Fang
Frequent Advisor

LINUX RH 7.1 - Unable to enable telnet service

Hi,
I'm trying to renable my telnet service after disabling it by modifying the "disable = yes" to "disable = true". However, I'm still unable to initiate a telnet session to that particular machine:
/root >>telnet 192.168.3.193
Trying 192.168.3.193...
telnet: Unable to connect to remote host: Connection refused

Below is the content of the telnet file from /etc/xinetd.d/:
$ cat /etc/xinetd.d./telnet
# 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
}

I had restarted the xinetd services with command below:
/etc/init.d >>xinetd restart
Stopping xinetd: [ OK ]
Starting xinetd: [ OK ]

/etc/init.d >>chkconfig --list |grep telnet
telnet: on

However, I'm still unable to do a telnet to the particular machine.

I've also modified the /etc/securetty file earlier to prevent root from logging into the following teminals, remotely:
$ cat /etc/securetty
vc/1
vc/2
vc/3
vc/4
vc/5
vc/6
vc/7
vc/8
vc/9
vc/10
vc/11
tty0
tty1
tty2
tty3
tty4
tty5
tty6
tty7
tty8
tty9
tty10
tty11

Hence, I'm not sure the modification to the /etc/securetty had affected the telnet.

Could anyone kindly help me out?

Thanks
8 REPLIES 8
Chakravarthi
Trusted Contributor

Re: LINUX RH 7.1 - Unable to enable telnet service

try enabling using setup command,

setup->system service--> enable telnet
RAC_1
Honored Contributor

Re: LINUX RH 7.1 - Unable to enable telnet service

You need disable=no and restart xinetd.

Anil
There is no substitute to HARDWORK
TwoProc
Honored Contributor

Re: LINUX RH 7.1 - Unable to enable telnet service

Review messages in /var/log/syslog - if they are any - this may point to security settings.
We are the people our parents warned us about --Jimmy Buffett

Re: LINUX RH 7.1 - Unable to enable telnet service

Hello,

1. Try to check the package with following command :
rpm -qa | grep telnet
and you should be able to see both telnet-server and telnet packages.

2. Then run setup --> services and look for iptables and ipchains are enabled, if yes then disabled.

3. Also run setup and firewall configuration, disable the firewall or make relevent changes to allow telnet protocol.

All the best..

Regards
Bindumadhava.
Danny Fang
Frequent Advisor

Re: LINUX RH 7.1 - Unable to enable telnet service

Hi everyone,

In my earlier post, I've mentioned about starting up xinetd and also setting the "disable = yes" to "disable = no" but to no avail.

I've just recently tried the method suggested by Chakravarthi and Bindumadhara of "setup -> system services -> telnet" and then did a "service telnet stop". However I'm still getting the error below:
/root >>telnet 192.168.3.193
Trying 192.168.3.193...
telnet: Unable to connect to remote host: Connection refused

I had to use SSH instead of telnet to access the machine remotely. At the affected machine, I did a chkconfig to verify if the telnet service is running. From the output below, telnet service is indeed running:
/root >>chkconfig --list|grep telnet
telnet: on

Could anyone kindly help me out?

Chakravarthi
Trusted Contributor

Re: LINUX RH 7.1 - Unable to enable telnet service

can you check your /etc/hosts.allow and /etc/hosts.deny

Re: LINUX RH 7.1 - Unable to enable telnet service

Hi,

Is telnet to localhost / 127.0.0.1 and ftp localhost are working..?
Also have you enabled kerberos..? You can also check in /etc/xinetd.d/krb5-telnet file.

Regards
Bindumadhava.
Eric van Dijken
Trusted Contributor

Re: LINUX RH 7.1 - Unable to enable telnet service

All your "connection refused" error point to one thing. Either your telnet daemon isn't active or you are being blocked (firewall/tcpd). You could try to check that with "netstat -na | grep -i list".
Check that there is a with your ip number and the port number for telnet 23. for example "tcp 0 0 127.0.0.1:23 0.0.0.0:* LISTEN"

If you have such a line, your telnet service is fine, from the system point of view.

So either you have ipchains (don't think rh7.1 had iptables) running. (been awhile since a saw a rh7.1 system, so please be gentle)
You could try to stop ipchains, with "/etc/init.d/ipchains stop" or (i think) edit the ipchains config in "/etc/sysconfig/ipchains" and remove the telnet part. (restart ipchains after the change)

Watch, Think and Tinker.