You can use Telnet to access other systems. These Telnet commands will help you do that.

Start Telnet and establish a con­nec­tion

Telnet is used from the command line, for example, the command prompt on Windows. Only one command is needed to start the client:

telnet

You can also connect directly without starting the client first. To do this, either specify the hostname or establish the con­nec­tion via IP address:

telnet <hostname></hostname>
telnet 127.0.0.1

You will now be asked to enter the access data and will then be connected.

Telnet standard commands

The following overview shows the standard commands. Some of these can be extended with arguments and executed using the Telnet client:

Command Short command De­scrip­tion
?/help ? Opens the help menu
Close c Closes the current Telnet con­nec­tion
display argument d Displays the various pa­ra­me­ters for the current con­nec­tion (port, terminal type, etc.)
environ argument   Defines the variables for the re­spec­tive operating system en­vi­ron­ment
toggle argument   De­ter­mines how Telnet reacts to certain sit­u­a­tions. The command changes the status from TRUE to FALSE or vice versa; using set or unset, the status can also be set directly ⁠— arguments are thus also valid for set/unset
Logout   Ter­mi­nates the current Telnet session if the remote host supports the logout option
mode type   Sets the trans­mis­sion type (text file, binary file)
open hostname o Es­tab­lish­es another con­nec­tion to the selected host in addition to the existing one
Quit q Ter­mi­nates the Telnet client including all active con­nec­tions
send argument sen Sends selected typical Telnet strings to the host
set argument set Modifies the con­nec­tion pa­ra­me­ters
Unset u Loads the pre­de­fined con­nec­tion pa­ra­me­ters
Status st Shows whether the con­nec­tion is active
Tip
Since Telnet is operated from the command line, you should also know other commands. Get to know Windows CMD commands to easily find your way around the command prompt.

Telnet command options

Some commands can be extended by arguments, which means that more options are available to you. Here are some important pa­ra­me­ters:

Command Option De­scrip­tion
telnet -d Activates debug mode
  -a Attempts automatic login
  -n tracefile Opens tracefile to record ap­pro­pri­ate in­for­ma­tion (see also “set tracefile”)
  -l user If the host supports environ, you will be logged in as the specified user.
  -e escape char Sets an escape character
  -E No character is rec­og­nized as escape character
  -x Attempts to activate en­cryp­tion
mode character Disables LINEMODE
  Line Enables LINEMODE
  isig/-isig Enables/disables the TRAPSIG mode of LINEMODE
  edit/-edit Enables/disables the EDIT mode of LINEMODE
  softtabs/-softtabs Enables/disables the SOFT_TABS mode of LINEMODE
  litecho/-litecho Enables/disables the LIT_ECHO-Modus of LINEMODE
send abort Sends “Abort process” sequence
  Ao Sends “Abort output” sequence; the host flushes the output from itself to the client.
  ayt Sends “Are you there” sequence; the host can confirm with a response.
  brk Sends “Break” sequence
  ec Sends “Erase character” sequence; the host erases the last character entered
  el Sends Erase line sequence; the host erases the line that is being entered
  eof Sends “End of file” sequence
  eor Sends “End of record” sequence
  esc Sends the current escape character (see also “telnet -e”)
  ga Sends “Go ahead” sequence
  getstatus Requests the host to discard any input that has not yet been processed
  ? Provides in­for­ma­tion about the send command
set/unset echo value De­ter­mines whether char­ac­ters entered should also be displayed
(value can be TRUE/FALSE or a special character) eof value Enables the “End of file” character (see also “send eof”)
  erase value Enables erase character (see also “send ec”); works only in lo­calchars mode (see also “toggle lo­calchars”)
  escape value Enables escape character (see also “telnet -e”)
  flushout­put value Enables abort output character (see also “send ao”); works only in lo­calchars mode (see also “toggle lo­calchars”)
  lnext value Enables “lnext” char­ac­ters
  quit value Enables “break” char­ac­ters (see also “send brk”); works only in lo­calchars mode (see also toggle lo­calchars)
  reprint value Enables “reprint” character
  start value Enables “start” character; only if TOGGLE-FLOW-CONTROL is enabled
  stop value Activates “stop” character; only if TOGGLE-FLOW-CONTROL is activated
  worderase value Enables “worderase” char­ac­ters
environ define variable value Assigns a value to a variable; values can be enclosed in single or double quotes.
  undefine variable Deletes the specified variable
  export variable Exports the specified variable
  unexport variable Specifies that the specified variable may only be exported when Telnet is specif­i­cal­ly requested to do so
  list Lists all variables; * character indicates whether the variable is exported au­to­mat­i­cal­ly.
  ? Provides in­for­ma­tion about the send command
toggle autosynch If both autosynch and lo­calchars are active, an ad­di­tion­al “synch” sequence is sent when the quit character is sent (see also “set quit”)
(Initial state is TRUE) binary Enables/disables “binary” option on input and output
  inbinary Enables/disables “binary” option at input
  outbinary Enables/disables binary option on output
  crlf TRUE: carriage return is set to <CR><LF>
  crmod FALSE: carriage return is set to <CR><NUL> (FALSE is the normal state here)
  debug Switches the state of the “carriage return” mode
  lo­calchars Switches the state of the “Socket debug” mode (FALSE is the normal state here)

For more Telnet commands and options, as well as detailed doc­u­men­ta­tion, check out the Telnet Man Page.

Tip
If you don’t really know the remote protocol yet, it’s worth taking a look at our detailed article on the subject ⁠— telnet. The article also explains how to enable Telnet in Windows.
Go to Main Menu