0

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?

Kevin M
  • 2,312
  • 1
  • 16
  • 21
kamal
  • 509
  • 4
  • 10
  • 21

5 Answers5

3

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.

BillThor
  • 27,737
  • 3
  • 37
  • 69
1

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
mdpc
  • 11,856
  • 28
  • 53
  • 67
1

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.

Skyhawk
  • 14,200
  • 4
  • 53
  • 95
Rilindo
  • 5,078
  • 5
  • 28
  • 46
0

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
David
  • 3,487
  • 26
  • 20
  • 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). – David 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. – David Oct 23 '11 at 08:47
0

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

Skyhawk
  • 14,200
  • 4
  • 53
  • 95
kamal
  • 509
  • 4
  • 10
  • 21