Communicate with another host using the TELNET protocol.

      TELNET [-a] [-e escape_char] [-f log_file] [-l user] [-t term] [host [port]]

   -a   Attempt automatic logon Same as -l except uses currently logged on user name
   -e   Escape character to enter telnet client prompt.
   -f   Filename for client side logging.
   -l   The username to login with on the remote system.
        Requires that the remote system support the TELNET ENVIRON option.
   -t   The terminal type: vt100, vt52, ansi or vtnt.
  host  The hostname or IP address of the remote computer.
  port  A port number or service name.   

Telnet sends all data as clear text including the username/password used for the intial connection.
For this reason it is strongly advised to use SSH instead.

The telnet client is disabled by default.
To enable it open 'Windows Features' ➞ 'Turn Windows features on and off' and select Telnet Client.
or in PowerShell run Install-WindowsFeature -name telnet-client

Telnet commands

 close    Disconnect from an existing Telnet connection.
 display  Show the current settings for Telnet Client.
 open     Use open hostname to establish a Telnet connection to a host.
 quit     Disconnect from the remote server (if connected) and close the Telnet Client.
 send     Send commands to the Telnet server. 
 send ao  Abort Output command.
 send ayt "Are you there?" command.
 send esc Sends the current escape character.
 send ip  Interrupt process command.
 send synch Perform a Telnet synch operation. 
 send brk   Send a break signal.
 set        Configure the Telnet Client for the current session:
 set bsasdel Backspace will be sent as delete
 set codeset option  Available only when the language is set to Japanese.
 set crlf  Set new-line mode; causes the RETURN key to send the combination of carriage
           return and line feed: 0x0D, 0x0A. When turned off, it sends only the carriage
           return character, 0x0D.
 set delasbs  Delete will be sent as backspace.
 set escape character
           Specifies the character that will switch from Telnet session mode to the
           Telnet command mode. From command mode, press ENTER to return to session mode.
 set localecho  Turn on local echo. All characters typed will be displayed on the local console.
               Remote Telnet servers usually send each character typed back, so setting this
               option could result in duplicate characters displayed for each one typed.
 set logfile name  The name of the Telnet log file for this session, also turns on logging.
                   The default path is your current directory.
 set logging  Turn on logging for this session.
 Set mode console
          Change the mode of operation to console mode (default).
          Setting the mode to console causes Telnet server to include ANSI or other escape
          commands to control cursor positioning within a fixed window of x rows and y columns.
 Set mode stream
          Change the mode of operation to stream mode.
          Setting the mode to stream turns off the ANSI or other escape commands that
          attempt to control cursor placement or clearing the screen.
          Stream mode is useful when you do not want the Telnet client to emulate a terminal.
          The output is sent as if there is no terminal window with x rows and y columns.
          Some applications that use Telnet for file transfer fail to work correctly when
          console mode is enabled.
 set ntlm Turn on NTLM authentication.
 set term {ansi | vt100 | vt52 | vtnt}  The type of terminal to emulate.
 status   Determines whether the computer running Telnet Client is connected.
 unset    Turns off an option previously set by using the set command.
 ?/help   Display Help.  ?/set Display Help information for the set command.

Anything other than one of the commands above will be sent as a string to the Telnet server.
For example, send ss64 sends the string ss64 to the Telnet server, which echoes the string in the Telnet session window.

Telnet communicates with the peer (telnet server) in clear text which is a potential security hazard for machines connected to the internet. Telnet traffic can be secured with Internet Protocol security (IPsec)

A more secure alternative to telnet is SSH (which is cross platform) or PuTTY: A Free Telnet/SSH Client.


20 & 21 File Transfer Protocol (FTP)
22 Secure Shell (SSH)
23 Telnet remote login service (the telnet client default)
25 Simple Mail Transfer Protocol (SMTP)
53 Domain Name System (DNS) service
80 Hypertext Transfer Protocol (HTTP) used in the World Wide Web
110 Post Office Protocol (POP3)
119 Network News Transfer Protocol (NNTP)
143 Internet Message Access Protocol (IMAP)
161 Simple Network Management Protocol (SNMP)
194 Internet Relay Chat (IRC)
443 HTTP Secure (HTTPS)
465 SMTP Secure (SMTPS)


Connect to the remote webserver for through HTTP port number 80 and retrieve the home page, note the GET command is case sensitive:

C:\> telnet 80
GET /index.html
<line feed>

“Is this to be an empathy test? Capillary dilation of the so-called blush response? Fluctuation of the pupil. Involuntary dilation of the iris... Deckard: We call it Voight-Kampff for short” ~ BladeRunner script

Related commands

SSH - OpenSSH remote login client.
Equivalent bash command (Linux): telnet - Communicate with another host using the TELNET protocol.
Equivalent PowerShell cmdlet: Enter-PSSession

Copyright © 1999-2023
Some rights reserved