1TELNET(1C)                                                          TELNET(1C)
2
3
4

NAME

6       telnet - user interface to the TELNET protocol
7

SYNOPSIS

9       telnet [ host [ port ] ]
10

DESCRIPTION

12       Telnet is used to communicate with another host using the TELNET proto‐
13       col.  If telnet is invoked without arguments, it enters  command  mode,
14       indicated by its prompt (“telnet>”).  In this mode, it accepts and exe‐
15       cutes the commands listed below.  If it is invoked with  arguments,  it
16       performs an open command (see below) with those arguments.
17
18       Once  a  connection  has been opened, telnet enters an input mode.  The
19       input mode entered will be either “character at a  time”  or  “line  by
20       line” depending on what the remote system supports.
21
22       In  “character  at a time” mode, most text typed is immediately sent to
23       the remote host for processing.
24
25       In “line by line” mode, all text is echoed locally, and (normally) only
26       completed  lines  are sent to the remote host.  The “local echo charac‐
27       ter” (initially “^E”) may be used to turn off and  on  the  local  echo
28       (this  would  mostly  be  used  to enter passwords without the password
29       being echoed).
30
31       In either mode, if the localchars toggle is TRUE (the default  in  line
32       mode;  see  below),  the  user's  quit,  intr, and flush characters are
33       trapped locally, and sent as TELNET protocol sequences  to  the  remote
34       side.   There  are  options  (see toggle autoflush and toggle autosynch
35       below) which cause this action to flush subsequent output to the termi‐
36       nal  (until the remote host acknowledges the TELNET sequence) and flush
37       previous terminal input (in the case of quit and intr).
38
39       While connected to a remote host, telnet command mode may be entered by
40       typing the telnet “escape character” (initially “^]”).  When in command
41       mode, the normal terminal editing conventions are available.
42
43       COMMANDS
44
45       The following commands are available.  Only enough of each  command  to
46       uniquely  identify it need be typed (this is also true for arguments to
47       the mode, set, toggle, and display commands).
48
49       open host [ port ]
50              Open a connection to the named host.  If no port number is spec‐
51              ified,  telnet  will  attempt  to contact a TELNET server at the
52              default port.  The host specification may be either a host  name
53              (see  hosts(5))  or  an  Internet  address specified in the “dot
54              notation” (see inet(3N)).
55
56       close
57              Close a TELNET session and return to command mode.
58
59       quit
60              Close any open TELNET session and exit telnet.  An end  of  file
61              (in command mode) will also close a session and exit.
62
63       z
64              Suspend  telnet.  This command only works when the user is using
65              the csh(1).
66
67       mode type
68              Type is either line (for “line by line” mode) or character  (for
69              “character  at a time” mode).  The remote host is asked for per‐
70              mission to go into the requested mode.  If the  remote  host  is
71              capable  of  entering  that  mode,  the  requested  mode will be
72              entered.
73
74       status
75              Show the current status of telnet.  This includes the  peer  one
76              is connected to, as well as the current mode.
77
78       display [ argument... ]
79              Displays all, or some, of the set and toggle values (see below).
80
81       ? [ command ]
82              Get  help.  With no arguments, telnet prints a help summary.  If
83              a command is specified, telnet will print the  help  information
84              for just that command.
85
86       send arguments
87              Sends  one  or  more  special  character sequences to the remote
88              host.  The following are the arguments which  may  be  specified
89              (more than one argument may be specified at a time):
90
91              escape
92                     Sends  the  current  telnet  escape  character (initially
93                     “^]”).
94
95              synch
96                     Sends the TELNET SYNCH sequence.   This  sequence  causes
97                     the  remote  system  to discard all previously typed (but
98                     not yet read) input.  This sequence is sent as TCP urgent
99                     data  (and may not work if the remote system is a 4.2 BSD
100                     system -- if it doesn't work, a lower  case  “r”  may  be
101                     echoed on the terminal).
102
103              brk
104                     Sends  the  TELNET  BRK  (Break) sequence, which may have
105                     significance to the remote system.
106
107              ip
108                     Sends the TELNET IP (Interrupt Process)  sequence,  which
109                     should  cause  the  remote  system to abort the currently
110                     running process.
111
112              ao
113                     Sends the TELNET AO (Abort Output) sequence, which should
114                     cause  the  remote  system  to  flush all output from the
115                     remote system to the user's terminal.
116
117              ayt
118                     Sends the TELNET AYT (Are You There) sequence,  to  which
119                     the remote system may or may not choose to respond.
120
121              ec
122                     Sends  the  TELNET  EC  (Erase Character) sequence, which
123                     should cause the remote system to erase the last  charac‐
124                     ter entered.
125
126              el
127                     Sends  the  TELNET EL (Erase Line) sequence, which should
128                     cause the remote system to erase the line currently being
129                     entered.
130
131              ga
132                     Sends the TELNET GA (Go Ahead) sequence, which likely has
133                     no significance to the remote system.
134
135              nop
136                     Sends the TELNET NOP (No OPeration) sequence.
137
138              ?
139                     Prints out help information for the send command.
140
141       set argument value
142              Set any one of a number of telnet variables to a specific value.
143              The  special  value “off” turns off the function associated with
144              the variable.  The values of variables may be interrogated  with
145              the display command.  The variables which may be specified are:
146
147              echo
148                     This  is  the value (initially “^E”) which, when in “line
149                     by line” mode, toggles between  doing  local  echoing  of
150                     entered characters (for normal processing), and suppress‐
151                     ing echoing of entered characters (for entering,  say,  a
152                     password).
153
154              escape
155                     This  is  the  telnet  escape  character (initially “^[”)
156                     which causes entry into telnet command  mode  (when  con‐
157                     nected to a remote system).
158
159              interrupt
160                     If  telnet  is  in localchars mode (see toggle localchars
161                     below) and the interrupt character is typed, a TELNET  IP
162                     sequence  (see send ip above) is sent to the remote host.
163                     The initial value for the interrupt character is taken to
164                     be the terminal's intr character.
165
166              quit
167                     If  telnet  is  in localchars mode (see toggle localchars
168                     below) and the quit character  is  typed,  a  TELNET  BRK
169                     sequence (see send brk above) is sent to the remote host.
170                     The initial value for the quit character is taken  to  be
171                     the terminal's quit character.
172
173              flushoutput
174                     If  telnet  is  in localchars mode (see toggle localchars
175                     below) and the flushoutput character is typed,  a  TELNET
176                     AO  sequence  (see  send  ao above) is sent to the remote
177                     host.  The initial value for the flush character is taken
178                     to be the terminal's flush character.
179
180              erase
181                     If  telnet  is  in localchars mode (see toggle localchars
182                     below), and if telnet is operating  in  “character  at  a
183                     time”  mode,  then when this character is typed, a TELNET
184                     EC sequence (see send ec above) is  sent  to  the  remote
185                     system.   The  initial  value  for the erase character is
186                     taken to be the terminal's erase character.
187
188              kill
189                     If telnet is in localchars mode  (see  toggle  localchars
190                     below),  and  if  telnet  is operating in “character at a
191                     time” mode, then when this character is typed,  a  TELNET
192                     EL  sequence  (see  send  el above) is sent to the remote
193                     system.  The initial value  for  the  kill  character  is
194                     taken to be the terminal's kill character.
195
196              eof
197                     If  telnet  is operating in “line by line” mode, entering
198                     this character as the first  character  on  a  line  will
199                     cause  this  character  to  be sent to the remote system.
200                     The initial value of the eof character is taken to be the
201                     terminal's eof character.
202
203       toggle arguments...
204              Toggle  (between  TRUE and FALSE) various flags that control how
205              telnet responds to events.  More than one argument may be speci‐
206              fied.   The  state  of  these flags may be interrogated with the
207              display command.  Valid arguments are:
208
209              localchars
210                     If this is TRUE, then the flush, interrupt, quit,  erase,
211                     and  kill  characters  (see  set  above)  are  recognized
212                     locally, and  transformed  into  (hopefully)  appropriate
213                     TELNET  control  sequences (respectively ao, ip, brk, ec,
214                     and el; see send above).  The initial value for this tog‐
215                     gle is TRUE in “line by line” mode, and FALSE in “charac‐
216                     ter at a time” mode.
217
218              autoflush
219                     If autoflush and localchars are both TRUE, then when  the
220                     ao,  intr,  or quit characters are recognized (and trans‐
221                     formed into TELNET sequences; see set above for details),
222                     telnet refuses to display any data on the user's terminal
223                     until the remote system acknowledges (via a TELNET Timing
224                     Mark   option)   that   it  has  processed  those  TELNET
225                     sequences.  The initial value for this toggle is TRUE  if
226                     the  terminal  user had not done an "stty noflsh", other‐
227                     wise FALSE (see stty(1)).
228
229              autosynch
230                     If autosynch and localchars  are  both  TRUE,  then  when
231                     either  the  intr  or  quit  characters is typed (see set
232                     above for descriptions of the intr and quit  characters),
233                     the  resulting  TELNET  sequence  sent is followed by the
234                     TELNET SYNCH sequence.  This procedure should  cause  the
235                     remote system to begin throwing away all previously typed
236                     input until both of the TELNET sequences have  been  read
237                     and  acted  upon.   The  initial  value of this toggle is
238                     FALSE.
239
240              crmod
241                     Toggle carriage return mode.  When this mode is  enabled,
242                     most  carriage return characters received from the remote
243                     host will be mapped into a carriage return followed by  a
244                     line  feed.   This  mode does not affect those characters
245                     typed by the user, only those received  from  the  remote
246                     host.   This  mode  is  not very useful unless the remote
247                     host only sends carriage return,  but  never  line  feed.
248                     The initial value for this toggle is FALSE.
249
250              debug
251                     Toggles  socket level debugging (useful only to the supe‐
252                     ruser).  The initial value for this toggle is FALSE.
253
254              options
255                     Toggles the display of some internal telnet protocol pro‐
256                     cessing  (having to do with TELNET options).  The initial
257                     value for this toggle is FALSE.
258
259              netdata
260                     Toggles the display of all network data  (in  hexadecimal
261                     format).  The initial value for this toggle is FALSE.
262
263              ?
264                     Displays the legal toggle commands.
265

BUGS

267       There is no adequate way for dealing with flow control.
268
269       On  some  remote  systems,  echo  has to be turned off manually when in
270       “line by line” mode.
271
272       There is enough settable state to justify a .telnetrc file.
273
274       No capability for a .telnetrc file is provided.
275
276       In “line by line” mode, the terminal's eof character is only recognized
277       (and  sent  to  the  remote system) when it is the first character on a
278       line.
279
280
281
2824.2 Berkeley Distribution        May 10, 1986                       TELNET(1C)
Impressum