Telnet Problem

Spiritdreams
Spiritdreams used Ask the Experts™
on
I have a linux machine, which only can telnet to other places, but when been telneted by other machine, it always says something about connection refused. and solutions to that?
Comment
Watch Question

Do more with

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

Commented:
There are three possible cause of a "connection refused" when trying to telnet to the system and they are:

1) The telnet server isn't installed

2) The telnet service isn't enabled

3) A firewall (on the host or network) is blocking access to inbound telnet.

Tell us more about which Linux you are using and we can provide hints to see where the problem is.

Author

Commented:
it is linux 2.4.19
I think it is not about the firewall.
Top Expert 2005

Commented:
That tells me the linux kernel version but not the distribution & version (SuSE, Mandrake, Redhat, etc). To be able to provide more that general assistance I really need to know which Linux variant you are using.
C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

Author

Commented:
Red Hat

Author

Commented:
Red Hat
Top Expert 2005
Commented:
Okay on a RedHat box you want to start by checking to see if the default firewall from install is running. Since I don't know what version of RedHat, you can try:

ipchains -L
--or--
iptables -L

if a firewall is running you'll see rule sets.

Next check to see if the telnet server is installed with:

rpm -q telnet-server

and for it to work you need an inet daemon, which could be inetd or xinetd (depending on what version of RedHat). Check for that with:

rpm -qa | grep inetd

If you have the telnet server installed and you are using xinetd, edit /etc/xinetd.d/telnet and set "disable = no". Then have xinetd re-read its configuration with 'killall -HUP xinetd', or re-start xinetd with 'service xinetd restart'.

If you are using an older (6.x) Redhat, check /etc/inetd.conf for the line that begins with 'telnet' and make sure that it is not commented out. If you change the file, tell inetd to re-read its config with 'killall -HUP inetd'.

Then, on this system attempt a telnet session to the localhost IP (telnet localhost) as an ordinary user, not root. The system won't allow you to login with telnet as root.

Assuming that works, and there isn't a local ipchains or iptables firewall, try a telnet connection to this system from some other system.

Author

Commented:
Thanks it worked pefect

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