telnet

Windows CMD · Network · reference only

What it does

Telnet client: it opens an unencrypted text connection to a host and port. Today it is mostly used to check whether a port answers.

Syntax

telnet [opciones] [equipo [puerto]]

Options and parameters

  • equipo

    Name or IP address of the host to connect to.

  • puerto

    TCP port to connect to; 23 by default.

  • -a

    Tries to log in automatically with the current user's name.

  • -e carácter

    Escape character to return to the telnet prompt.

  • -f fichero

    Saves the session log to a file.

  • -l usuario

    User name to log in with.

  • -t tipo

    Terminal type sent to the server.

Usage examples

  • dism /online /Enable-Feature /FeatureName:TelnetClient

    Installs the Telnet client, which is not enabled by default (administrator console).

  • telnet servidor 25

    Checks whether port 25 (mail) of the server answers.

  • telnet 192.168.1.10 22

    If port 22 is open, the SSH server's greeting appears.

  • telnet -f registro.txt servidor 23

    Connects saving the session to a file.

Notes and common mistakes

  • Telnet encrypts nothing, not even passwords: use SSH to manage machines.
  • To leave a session press Ctrl+] and type quit.

Related commands