LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-10-2010, 10:20 AM   #1
chaitanyajun12
Member
 
Registered: Nov 2010
Posts: 38

Rep: Reputation: 0
telnet: Unable to connect to remote host: Connection refused


when i am trying to telnet to a machine connected in our LAN ..

cmd prompt> telnet <ip>
cmd prompt> Trying <ip> ...
telnet: Unable to connect to remote host: Connection refused

What's the reason for this? how do i establish a connection?
I am using ubuntu 10.04.


thanks in advance,
Chaitanya.

Last edited by chaitanyajun12; 11-10-2010 at 10:21 AM.
 
Old 11-10-2010, 10:23 AM   #2
redgoblin
Member
 
Registered: Jun 2005
Location: UK
Distribution: Debian
Posts: 189

Rep: Reputation: 41
The most likely reason is the machine you’re trying to connect to isn’t running a telnet service.

Log onto that machine anther way and check if telnetd is running. These days it’s often not installed as standard or turned off.
 
Old 11-10-2010, 10:30 AM   #3
chaitanyajun12
Member
 
Registered: Nov 2010
Posts: 38

Original Poster
Rep: Reputation: 0
@red

For the communication to take place both the telnetd should be running?
how to turn on the daemon?


Chaitanya.
 
Old 11-10-2010, 11:00 AM   #4
redgoblin
Member
 
Registered: Jun 2005
Location: UK
Distribution: Debian
Posts: 189

Rep: Reputation: 41
Not sure what you mean. Telnetd should be running on the machine that you are trying to connect to. Otherwise there's nothing at the other end to "answer" your telnet connection. It does not need to be running on the machine that you are connecting from.

Also the machine your connecting to should not be blocking port 23 (the standard telnet port).

If possible, go to the machine you wish to connect to and check that telnetd is actually installed (it's often not by default). Then check it's actually running. How you do this depends on what version of Linux/BSD/Unix/Whatever you might be running.

Also, unless you absolutely have to use telnet consider using something more secure like SSH.

Edit: I've just noticed from your original post that you're running Ubuntu.

Install telnetd with

Code:
sudo apt-get install telnetd
If it installs then it should auto start. If not it can be restarted with;

Code:
sudo /etc/init.d/inetd restart
Then while still on that machine you can check it's working with

Code:
telnet localhost
However, keep in mind that telnet it horribly insecure. Consider using something else if you can.

Last edited by redgoblin; 11-10-2010 at 11:23 AM. Reason: corrected restart instructions
 
Old 11-10-2010, 11:08 AM   #5
chaitanyajun12
Member
 
Registered: Nov 2010
Posts: 38

Original Poster
Rep: Reputation: 0
ok. even same is the case with ssh also?
I am using linux ubuntu 10.04.

so how i do make sure its running..?

Chaitanya.
 
Old 11-10-2010, 11:22 AM   #6
chaitanyajun12
Member
 
Registered: Nov 2010
Posts: 38

Original Poster
Rep: Reputation: 0
thanks red.!
 
Old 11-10-2010, 11:24 AM   #7
chaitanyajun12
Member
 
Registered: Nov 2010
Posts: 38

Original Poster
Rep: Reputation: 0
ok ..i will use ssh.
then how to get the X applications running on the remote machine?
i want to try this..

eagerly waiting for ur reply
Chaitanya.
 
Old 11-10-2010, 11:28 AM   #8
redgoblin
Member
 
Registered: Jun 2005
Location: UK
Distribution: Debian
Posts: 189

Rep: Reputation: 41
Firstly I've just noticed that I got the "how to restart the service" part wrong. It should be inetd not telnetd. I've edited that in my old post.

If you still having issues try;

http://www.cyberciti.biz/faq/how-do-...reebsd-system/

Edit: Just seen you last response. If you're interested in running X applications over SSH then do a quick Google search. If you still can't get it working try starting a new thread with details of what problems you're having.

Last edited by redgoblin; 11-10-2010 at 11:31 AM.
 
Old 11-10-2010, 11:37 AM   #9
chaitanyajun12
Member
 
Registered: Nov 2010
Posts: 38

Original Poster
Rep: Reputation: 0
ok thanks for that correction.
actually i have remotely connected to the system.
ok then i will google regarding running X application remotely.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
telnet: Unable to connect to remote host: Connection refused thomas2004ch Linux - Newbie 1 09-11-2009 02:51 AM
telnet: Unable to connect to remote host: Connection refused stuckz Fedora 6 06-21-2007 02:36 AM
telnet: Unable to connect to remote host: Connection refused stuckz Fedora - Installation 2 06-19-2007 09:21 AM
telnet: Unable to connect to remote host: Connection refused batham Linux - Networking 0 07-07-2003 05:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:14 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration