Ubuntu Linux enable telnet service

Q. How do I install and start telnet service / server under Ubuntu Linux?

A. Telnet is an insecure service. It is recommended that you use ssh service. However sometime telnet server or service is needed. Here are instructions to enable telnet:

Install telnetd server

$ sudo apt-get install telnetd
Restart inetd service:
$ sudo /etc/init.d/openbsd-inetd restart
You should now be able to telnet to the server from Windows or Linux desktop system to Ubentu Linux telnet server. Type the following command to connect to Telnet server:
$ telnet ubentu-linux-server-ip
$ telnet
$ telnet ubentu.mydomain.com

See also:

🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 20 comments so far... add one

CategoryList of Unix and Linux commands
Disk space analyzersdf duf ncdu pydf
File Managementcat cp mkdir tree
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Modern utilitiesbat exa
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg glances gtop jobs killall kill pidof pstree pwdx time vtop
Searchingag grep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
20 comments… add one
  • Juan Jul 13, 2007 @ 5:30

    I tried this with ubuntu feisty fawn and it din’t work, it says

    sudo: /etc/init.d/inetd: command not found

    I have telnetd installed

  • zer0x Oct 2, 2007 @ 13:49

    sudo /etc/init.d/openbsd-inetd restart


  • Raghav Chettri Mar 17, 2008 @ 10:30

    Running Telnet Server differs as per Linux OS you use.
    If your Telnet server is not starting or you find “Connection refused…” try this for DEBIAN LINUX

    sudo /etc/init.d/openbsd-inetd restart

    Now try telnet..

    SMile now :-)


  • Phil Karras Apr 14, 2008 @ 15:49

    I’ve just installed Ubuntu Server 7.04 as LAMP & set the /etc/inetd.conf file as specified & when I try to restart the process:

    sudo /etc/init.d/openbsd-inetd restart

    I get “command not found” What have I done wrong?

    Phil Karras

    • Dhaval Jan 25, 2015 @ 5:11

      Install by command sudo apt-get install openbsd-inetd and then put the command sudo telnet ip-address it will work

  • nick humphrey May 28, 2008 @ 6:47

    that means that openbsd-inetd isn’t installed =)

  • nick humphrey May 28, 2008 @ 6:49

    sudo apt-get install telnetd

  • dan Oct 2, 2008 @ 2:51

    I would like to run telnetd, but only
    on one ethernet interface (so that telnet
    will be refused on every other interface).

    Is there any advice on how to do this,
    or hidden pitfalls? (Apart of course
    from running telnet at all. But there’s
    one network which i think is safe.)

  • Nikolaj Dec 30, 2008 @ 18:32

    hmm, I can’t connect to anything :O it’s just saying “Trying [ip_adress]…”
    after that, I get a timeout :/

  • ahti kare Oct 23, 2009 @ 20:53

    It works!

  • surely Jan 3, 2010 @ 5:53

    Thank YOU

  • Oliver Luvian Mar 29, 2010 @ 19:01

    Gracias amigo, me saco de apuros

    Thank You :-)

  • gfun Jun 8, 2010 @ 7:30

    Thank you man
    you’re the best

  • Suspense Sep 8, 2010 @ 6:43

    It really works… thanks a lot dude.. I’m trying this from a month ago and it was not working.
    It was really a great…. thanks once again.

  • Rajeev Apr 25, 2011 @ 8:49

    while trying this command : sudo /etc/init.d/openbsd-inetd restart
    I got this message:
    * Restarting internet superserver inetd
    * Not starting internet superserver: no services enabled

    However I have installed the telnetd successfully by using this command:
    sudo apt-get install inetutils-telnetd

  • Parul Sep 23, 2011 @ 4:52

    I ran following two commands on my laptop running edubantu
    $ sudo apt-get install telnetd
    $ sudo /etc/init.d/openbsd-inetd restart

    Then I went to my Windows XP laptop and tried to ping/telnet the edubantu IP address but it does not recognize that.
    Am I missing some thing.


  • shrek Nov 18, 2011 @ 18:38

    thanks . I was searching for it.

  • qubik Feb 13, 2012 @ 21:13

    Muy util, me ha servido de maravilla. Muchas gracias! :)

  • Awais Shah Oct 11, 2012 @ 7:35

    Thnx buddy… it helped me… thats the nice one… :)

  • plaa plaa Apr 22, 2014 @ 12:12

    worked also on ubuntu 14.04 lts server, thanks

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum