9

I am installing Ubuntu Server 13.10 and cant get telnet working on the server. I have installed both xinet.d & telnetd thru apt-get and restarted xinetd but nothing is started when I do a netstat -l. In googling, the trouble I see mention of adding telnet stream tcp wait telnetd /usr/sbin/tcpd /usr/sbin/in.telnetd line to /etc/inetd.conf. I have no inetd.conf. I see that inetd has been depracated and I put the line in xinetd.conf and restarted xinetd service but still no telnet listening. Can someone advise me on what the proper settings for the telnet server and what files they should be in. Here is the content of my xinetd.conf file:

# Simple configuration file for xinetd
#
# Some defaults, and include /etc/xinetd.d/

defaults
{

# Please note that you need a log_type line to be able to use log_on_success
# and log_on_failure. The default is the following :
# log_type = SYSLOG daemon info

}

includedir /etc/xinetd.d

#:STANDARD: These are standard services.
telnet      stream  tcp nowait  telnetd /usr/sbin/tcpd  /usr/sbin/in.telnetd

Thanks

jobin
  • 27,142
  • 16
  • 100
  • 116
AlanK
  • 141
  • 1
  • 2
  • 7
  • 2
    It is 2014, **why** do you want to install telnet? – Elliott Frisch Mar 26 '14 at 17:30
  • Why are you using telnet? It is an obsolete and insecure protocol. Use `ssh` instead: it's secure, faster ( uses compression ) and has other nifty features, like the ability to forward ports. – psusi Mar 26 '14 at 17:30
  • I'm only using it internally for a computer class and want to kiss. – AlanK Mar 26 '14 at 17:40
  • Could be a lot of things... probably no one tested it in the last... well... ten years? ;-) – Rmano Mar 26 '14 at 18:45
  • You seem to think that `/etc/inetd.conf` and `xinetd.conf` use the same format. Have you read `man xinetd`, `man -k xinetd`, `man inetd`, `man -k inetd`, `man telnetd`? Does `/etc/default/telnetd` exist? Have you done `grep telnet /var/log/*`? – waltinator Apr 04 '14 at 22:19
  • the only reason to use Telnet in 2015 is maybe to debug a network connection in the raw, or as an embedded developer. Otherwise, you should use SSH, especially if you want to keep things simple as you said. – 0xF2 Feb 14 '15 at 15:23
  • Did you get it to work? – William Sep 01 '15 at 15:09

1 Answers1

2

After installing telnetd and xinetd with command

sudo apt-get install xinetd telnetd

Create file telnet and put in /etc/xinetd.d

sudo nano /etc/xinetd.d/telnet

# default: on
# description: The telnet server serves telnet sessions; it uses
# unencrypted username/password pairs for authentication.
service telnet
{
disable = no
flags = REUSE
socket_type = stream
wait = no
user = root
server = /usr/sbin/in.telnetd
log_on_failure += USERID
}

Restart xinetd service

sudo service xinetd restart

In xinetd.conf you have includedir /etc/xinetd.d and don't need line

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

erase it.

In telnet file you can add more option like:

only_from = 192.168.120.0/24 #Only users in 192.168.120.0 can access to
only_from = .bob.com #allow access from bob.com
no_access = 192.168.120.{101,105} #not allow access from the two IP.
2707974
  • 10,363
  • 6
  • 31
  • 44