Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am trying to telnet from host 10.0.1.91 (centos) to host 10.0.11.162 (ubuntu). When I try to connect to the Ubuntu host, I get:

telnet 10.0.11.162 4949
Trying 10.0.11.162...
Connected to a.b.c (10.0.11.162).
Escape character is '^]'.
Connection closed by foreign host.

on host 10.0.11.162 (Ubuntu)

ps -ef | grep telnet
root      6682  4564  0 00:33 pts/0    00:00:00 grep --color=auto telnet

but telnetd is already at the newest version.

apt-get install telnetd
Reading package lists... Done
Building dependency tree       
Reading state information... Done
telnetd is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 348 not upgraded.

How can I telnet to the Ubuntu machine?

share|improve this question
4  
I assume there is a reason why you are not using the more secure and more convenient "secure shell" (ssh)? –  Soviero Oct 22 '11 at 5:47
    
Did the inetd get restarted after the telnetd install? –  Zoredache Oct 22 '11 at 7:57
    
The OP didn't appear to state his issue correctly. BillThor noted that the kamal is trying to connect to a munin node. –  Rilindo Oct 23 '11 at 0:34

5 Answers 5

Remove the telnetd package it is not needed. Execute the command apt-get purge telnetd to fully remove the package.

You only need the teluet client package to connect to other servers.

It appears you are testing a Munin node. Your allow rules do not allow access from the host you are connecting from. Edit your /etc/munin/munin-node.conf file to allow access.

share|improve this answer

It looks to me that there is a firewall involved somewhere along the way. Maybe even the unbutu client machine has it enabled probably for telnet.

Another thought is that the /etc/xinetd.d/telnet entry is disabling telnet on the ubuntu machine. You could check this out, and then kill -1 the xinetd process after making the change.

BUT....Why not use ssh to get to the other machine? It is FAR more secure than telnet and does nearly the same thing. All you'd have to enter is:

 ssh 10.0.11.162
share|improve this answer
    
i cannot use ssh, since i wan to telnet to a port other than 22 to see if the application is working –  kamal Oct 22 '11 at 11:24
1  
@kamal Use the swiss army knife (netcat) for that. Usage: nc host port) –  Lekensteyn Oct 22 '11 at 13:42
    
@kamal If you're trying to connect to a non-telnet application, why did you install telnetd? –  Shane Madden Oct 22 '11 at 18:59

Your telnet is working fine. What you are trying to do is to test munin connectivity. The steps are documented here:

http://munin-monitoring.org/wiki/Debugging_Munin_plugins

But to make it short, after you get to this:

# telnet foo.example.com 4949
Trying foo.example.com...
Connected to foo.example.com.
Escape character is '^]'.

you need to enter a command that will query the plugin, such as df:

fetch df

Which should return the following:

_dev_hda1.value 83

Please review the above URL.

share|improve this answer

When I'm testing networking connectivity, I always try to connect from localhost to see if there aren't firewalls/routers/etc involved in causing problems.

From the ubuntu machine, are you able to do:

telnet localhost 4949
share|improve this answer
    
localhost telnet works: root@mpcore:/etc# telnet localhost 4949 Trying ::1... Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. # munin node at mpcore help # Unknown command. Try cap, list, nodes, config, fetch, version or quit list apache_accesses apache_processes apache_volume cpu df df_inode entropy forks fw_packets http_loadtime if_err_eth0 if_eth0 interrupts iostat iostat_ios irqstats load lpstat memory open_files open_inodes proc_pri processes swap threads uptime users vmstat –  kamal Oct 22 '11 at 11:17
    
If you can telnet to localhost, then telnet is working fine. The next step is to try to telnet from another host on the same subnet (something with a 10.0.11.x IP). –  Dave Oct 22 '11 at 16:59
    
@Dave this is only partly a good solution. This test only works for software that is listening on all IP addresses. If the software would only listen on the localhost then you would succeed as well but you can still not connect from outside. Better would be to test the IP address from the ethernet interface. (e.g. telnet 10.10.10.10 4949) –  Raffael Luthiger Oct 22 '11 at 23:39
    
Agreed, but it's a good first test to make sure the service is running and correctly responding. –  Dave Oct 23 '11 at 8:47
up vote 0 down vote accepted

sudo apt-get install rlinetd did it. I was able to telnet after that.

share|improve this answer
    
Congratulations, @kamal! You can accept your own answer by clicking on the check mark. –  Skyhawk Nov 7 '11 at 0:41

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.