Solved

Connection Refused. REDHAT 6.2

Posted on 2001-08-20
9
485 Views
Last Modified: 2013-12-15
I have just installed RH 6.2 in office. But when I telnet to the box, it gives "connection refused". I can ping the box.

Any files which I must modify?

Thanks
0
Comment
Question by:Judy_M
  • 5
  • 2
  • 2
9 Comments
 

Expert Comment

by:sdc_phong
ID: 6408908
I think you should check the following:

1. Check if in.telnetd is installed (rpm -qf `which in.telnetd`). If it's not, install it (this is should installed by default, however)

2. Check if inetd or xinetd is installed
 (rpm -qa|grep inetd)

3. Check if inetd/xinetd is listen for telnet connection (netstat -na|grep :23)

4. If inetd is installed, check if a following line is present in your /etc/inetd.conf (grep telnet /etc/inetd.conf)

telnet  stream  tcp     nowait  root    /usr/sbin/tcpd  in.telnetd

5. If xinetd is installed, check if file /etc/xinetd.d/telnet doesn't contain something like
disable=true

Hope you can get it working.

Cheers.

Nguyen Thanh Phong.
0
 

Author Comment

by:Judy_M
ID: 6409073
Hi,

inetd was installed after reading your note.

xinetd is not installed.

The rest of the conditions you specified are met.

Now, the error is slightly different. Connection was closed *immediately* after I telnet to the box
Error Message --> Connection closed by foreign host.
0
 

Expert Comment

by:sdc_phong
ID: 6409116
Can you send the screen dump of the telnet session (from beginning to connection closed).

BTW, do you telnet in as root or normal user? If you did with root, try again with normal user. By default, root user is NOT ALLOWED to telnet to the host.

Cheers.

Nguyen Thanh Phong
0
 

Author Comment

by:Judy_M
ID: 6409538
Hi,

Here's the dump:

$telnet myhost
Trying 165.204.194.115...
Connected to myhost.blahblah.com.
Escape character is '^]'.
Connection closed by foreign host.
$
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 4

Expert Comment

by:MFCRich
ID: 6410880
The files '/etc/hosts.allow' and '/etc/hosts.deny' control access through inetd services. Check "man 5 hosts_access" for the details.
0
 

Author Comment

by:Judy_M
ID: 6411673
Hi,

inetd was installed after reading your note.

xinetd is not installed.

The rest of the conditions you specified are met.

Now, the error is slightly different. Connection was closed *immediately* after I telnet to the box
Error Message --> Connection closed by foreign host.
0
 

Author Comment

by:Judy_M
ID: 6411692
Both hosts.allow and hosts.deny has nothing in them.

But after adding ALL:ALL in hosts.allow, I still get the same error:

$telnet myhost
Trying 165.204.194.115...
Connected to myhost.blahblah.com.
Escape character is '^]'.
Connection closed by foreign host.
$
0
 

Author Comment

by:Judy_M
ID: 6412004
Updates:

$ftp myhost
Connected to myhost.blahblah.com.
421 Service not available, remote server has closed connection

In my inetd.conf, I have:
ftp stream tcp nowait root /usr/sbin/tcpd in.ftpd -l -a
telnet stream tcp nowait root /usr/sbin/tcpd in.telnetd
........
........

Thanks.
0
 
LVL 4

Accepted Solution

by:
MFCRich earned 50 total points
ID: 6414889
Do you have a file '/usr/sbin/tcpd'? I believe it is part of the tcpwrappers package. Also inetd may need to be restarted if you touched any if its configuration files.

> /etc/rc.d/init.d/inet restart   # Restart inetd
or
> /etc/rc.d/init.d/inet status    # check status of inetd

Also check to see if inetd is set to start at boot time;

> chkconfig --list  inet # as root

The above command will show whether inetd is configured to start for each run level

> chkconfig --level 345 inet on # also as root

will set it so inetd starts up in run levels 3, 4, and 5 which is most likely what you want.

0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now