60

How can we install a telnet client in Ubuntu 16.04? With this command, we can install a telnet server:

sudo apt-get install xinetd telnetd

But can a telnet client be installed without a telnet server? A telnet server can be dangerous.

Eliah Kagan
  • 116,445
  • 54
  • 318
  • 493
m-tech
  • 703
  • 1
  • 5
  • 6

3 Answers3

125
apt-get update 
apt-get install telnet

This is a valid question BTW. Do not install the telnet server, ever. Also the telnet client is not included by default in many distros. For instance it is very common in docker-land to face the need of installing several tools that are taken otherwise for granted. For example, Official OS docker images most likely will be shipped with a shell and its built-ins. Telnet will not be shipped in any of those.

zx485
  • 2,249
  • 11
  • 24
  • 34
Nestor Urquiza
  • 1,396
  • 1
  • 8
  • 3
  • 14
    I have to `apt-get update` first to update the package lists. – f01 Mar 06 '17 at 03:52
  • When you say not to install it, why do you say it so forcefully? Is there a potential harm in doing so? Legitimately curious... – cygnus_x1 Sep 26 '17 at 01:09
  • 1
    @cygnus_x1 The question here is how to install the client (telnet) package. I was, in addition to responding the question, warning to not install the telnet server (xinetd telnetd) package ever just because it is not needed to use the telnet client and because its existence would make the telnet service available and invite users to connect over an unencrypted channel. – Nestor Urquiza Sep 27 '17 at 19:31
  • This should be the accepted answer, otherwise the message `"bash: telnet: command not found"` shouldn't be showed. – Alessandro C Feb 14 '19 at 13:09
  • telnet vs telnetd package? what can I do if I will install telnet server? I read somewhere it can be used to connect to client using putty. alternative of ssh. Then how come telnet towel.blinkenlights.nl is showing star wars? – P Satish Patro Jun 21 '19 at 07:04
  • 1
    @PSatishPatro telnetd installs the server. Not recommended as I said though. – Nestor Urquiza Aug 15 '19 at 08:33
36

A lot of docker images don't come with standard tools like vim, ping & telnet. You may need to install them explicitly.

sudo apt-get update && apt-get install telnet
Pablo Bianchi
  • 14,308
  • 4
  • 74
  • 117
Tamil
  • 461
  • 4
  • 3
6

You shouldn't need to install any packages; a telnet client should come standard with Ubuntu. Just open a terminal window (Alt + Ctrl + T) and use the telnet command (for help, type man telnet)

Pablo Bianchi
  • 14,308
  • 4
  • 74
  • 117
Nick Weinberg
  • 4,555
  • 4
  • 24
  • 30
  • 14
    Not necessarily true. See the next answer, which explains how to install telnet client if it's not found. It's quite common to have a base Ubuntu with very, very little installed, especially in a containerized world. – Joseph Larson Apr 10 '18 at 20:05
  • Not installed in most of docker containers. apt-get install telnet is valid response – Alfonso Tienda Jun 27 '19 at 10:39