1
.\" Copyright (c) 1983, 1990 The Regents of the University of California.
2
.\" All rights reserved.
4
.\" Redistribution and use in source and binary forms, with or without
5
.\" modification, are permitted provided that the following conditions
7
.\" 1. Redistributions of source code must retain the above copyright
8
.\" notice, this list of conditions and the following disclaimer.
9
.\" 2. Redistributions in binary form must reproduce the above copyright
10
.\" notice, this list of conditions and the following disclaimer in the
11
.\" documentation and/or other materials provided with the distribution.
12
.\" 3. All advertising materials mentioning features or use of this software
13
.\" must display the following acknowledgement:
14
.\" This product includes software developed by the University of
15
.\" California, Berkeley and its contributors.
16
.\" 4. Neither the name of the University nor the names of its contributors
17
.\" may be used to endorse or promote products derived from this software
18
.\" without specific prior written permission.
20
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32
.\" from: @(#)telnet.1 6.16 (Berkeley) 7/27/91
33
.\" $Id: telnet.1,v 1.15 2000/07/30 23:57:08 dholland Exp $
37
.Os "Linux NetKit (0.17)"
40
.Nd user interface to the
47
.Op Fl e Ar escapechar
58
is used for interactive communication with another host using the
60
protocol. It begins in command mode, where it prints a telnet prompt
65
argument, it performs an
67
command implicitly; see the description below.
70
.Bl -tag -width indent
72
Force IPv4 address resolution.
74
Force IPv6 address resolution.
76
Request 8-bit operation. This causes an attempt to negotiate the
78
option for both input and output. By default telnet is not 8-bit
81
Disables the escape character functionality; that is, sets the escape
82
character to ``no character''.
84
Specifies an 8-bit data path on output. This causes the
86
option to be negotiated on just output.
88
Attempt automatic login. Currently, this sends the user name via the
93
option if supported by the remote system. The username is retrieved
97
Sets the initial value of the
104
In this mode, the default escape character is a tilde. Also, the
105
interpretation of the escape character is changed: an escape character
106
followed by a dot causes
108
to disconnect from the remote host. A ^Z instead of a dot suspends
110
and a ^] (the default
112
escape character) generates a normal telnet prompt. These codes are
113
accepted only at the beginning of a line.
115
Sets the IP type-of-service (TOS) option for the telnet
116
connection to the value
118
.It Fl e Ar escapechar
119
Sets the escape character to
121
If no character is supplied, no escape character will be used.
122
Entering the escape character while connected causes telnet to drop to
127
as the user to log in as on the remote system. This is accomplished by
128
sending the specified name as the
130
environment variable, so it requires that the remote system support the
132
option. This option implies the
134
option, and may also be used with the
137
.It Fl n Ar tracefile
140
for recording trace information.
145
Specifies a host to contact over the network.
147
Specifies a port number or service name to contact. If not specified,
155
Once a connection has been opened,
157
will attempt to enable the
162
will revert to one of two input modes:
163
either \*(Lqcharacter at a time\*(Rq
164
or \*(Lqold line by line\*(Rq
165
depending on what the remote system supports.
169
is enabled, character processing is done on the
170
local system, under the control of the remote system. When input
171
editing or character echoing is to be disabled, the remote system
172
will relay that information. The remote system will also relay
173
changes to any special characters that happen on the remote
174
system, so that they can take effect on the local system.
176
In \*(Lqcharacter at a time\*(Rq mode, most
177
text typed is immediately sent to the remote host for processing.
179
In \*(Lqold line by line\*(Rq mode, all text is echoed locally,
180
and (normally) only completed lines are sent to the remote host.
181
The \*(Lqlocal echo character\*(Rq (initially \*(Lq^E\*(Rq) may be used
182
to turn off and on the local echo
183
(this would mostly be used to enter passwords
184
without the password being echoed).
188
option is enabled, or if the
192
(the default for \*(Lqold line by line\*(Lq; see below),
198
characters are trapped locally, and sent as
200
protocol sequences to the remote side.
203
has ever been enabled, then the user's
216
There are options (see
223
which cause this action to flush subsequent output to the terminal
224
(until the remote host acknowledges the
226
sequence) and flush previous terminal input
236
commands are available. Unique prefixes are understood as abbreviations.
238
.Bl -tag -width "mode type"
239
.It Ic auth Ar argument ...
243
.Dv TELNET AUTHENTICATE
246
was compiled without authentication, the
248
command will not be supported.
249
Valid arguments are as follows:
250
.Bl -tag -width "disable type"
251
.It Ic disable Ar type
252
Disable the specified type of authentication. To
253
obtain a list of available types, use the
256
.It Ic enable Ar type
257
Enable the specified type of authentication. To
258
obtain a list of available types, use the
262
List the current status of the various types of
266
Note that the current version of
268
does not support authentication.
270
Close the connection to the remote host, if any, and return to command
272
.It Ic display Ar argument ...
273
Display all, or some, of the
278
.It Ic encrypt Ar argument ...
279
The encrypt command controls the
283
was compiled without encryption, the
285
command will not be supported.
287
Valid arguments are as follows:
289
.It Ic disable Ar type Ic [input|output]
290
Disable the specified type of encryption. If you do not specify input
291
or output, encryption of both is disabled. To obtain a list of
292
available types, use ``encrypt disable \&?''.
293
.It Ic enable Ar type Ic [input|output]
294
Enable the specified type of encryption. If you do not specify input
295
or output, encryption of both is enabled. To obtain a list of
296
available types, use ``encrypt enable \&?''.
298
This is the same as ``encrypt start input''.
300
This is the same as ``encrypt stop input''.
302
This is the same as ``encrypt start output''.
304
This is the same as ``encrypt stop output''.
305
.It Ic start Ic [input|output]
306
Attempt to begin encrypting. If you do not specify input or output,
307
encryption of both input and output is started.
309
Display the current status of the encryption module.
310
.It Ic stop Ic [input|output]
311
Stop encrypting. If you do not specify input or output, encryption of
314
Sets the default type of encryption to be used with later ``encrypt start''
315
or ``encrypt stop'' commands.
318
Note that the current version of
320
does not support encryption.
321
.It Ic environ Ar arguments...
324
command is used to propagate environment variables across the
329
All variables exported from the shell are defined, but only the
333
variables are marked to be sent by default. The
335
variable is marked to be sent if the
339
command-line options were used.
341
Valid arguments for the
345
.It Ic define Ar variable value
350
Any variables defined by this command are automatically marked for
351
propagation (``exported'').
354
may be enclosed in single or double quotes so
355
that tabs and spaces may be included.
356
.It Ic undefine Ar variable
357
Remove any existing definition of
359
.It Ic export Ar variable
360
Mark the specified variable for propagation to the remote host.
361
.It Ic unexport Ar variable
362
Do not mark the specified variable for propagation to the remote
363
host. The remote host may still ask explicitly for variables that are
366
List the current set of environment variables.
369
will be propagated to the remote host. The remote host may still ask
370
explicitly for the rest.
372
Prints out help information for the
379
protocol option to the remote host.
380
This command is similar to a
382
command. If the remote host does not support the
384
option, nothing happens. But if it does, this command should cause it
385
to close the connection. If the remote side also supports the concept
386
of suspending a user's session for later reattachment, the logout
387
command indicates that the session should be terminated immediately.
390
is one of several options, depending on the state of the session.
392
asks the remote host to go into the requested mode. If the remote host
393
says it can, that mode takes effect.
398
option, or, if the remote side does not understand the
400
option, then enter \*(Lqcharacter at a time\*(Lq mode.
404
option, or, if the remote side does not understand the
406
option, then attempt to enter \*(Lqold-line-by-line\*(Lq mode.
407
.It Ic isig Pq Ic \-isig
408
Attempt to enable (disable) the
413
This requires that the
416
.It Ic edit Pq Ic \-edit
417
Attempt to enable (disable) the
422
This requires that the
425
.It Ic softtabs Pq Ic \-softtabs
426
Attempt to enable (disable) the
431
This requires that the
434
.It Ic litecho Pq Ic \-litecho
435
Attempt to enable (disable) the
440
This requires that the
444
Prints out help information for the
455
Open a connection to the named host. If no port number is specified,
457
will attempt to contact a
459
daemon at the standard port (23).
460
The host specification may be a host name or IP address.
463
option may be used to specify a user name to be passed to the remote
468
When connecting to ports other than the
474
protocol negotiations. This makes it possible to connect to services
475
that do not support the
477
protocol without making a mess. Protocol negotiation can be forced by
478
placing a dash before the port number.
480
After establishing a connection, any commands associated with the
485
file are executed, in that order.
487
The format of the telnetrc files is as follows: Lines beginning with a
488
#, and blank lines, are ignored. The rest of the file should consist
489
of hostnames and sequences of
491
commands to use with that host. Commands should be one per line,
492
indented by whitespace; lines beginning without whitespace are
493
interpreted as hostnames. Lines beginning with the special hostname
495
will apply to all hosts. Upon connecting to a particular host, the
496
commands associated with that host are executed.
498
Close any open session and exit
500
An end of file condition on input, when in command mode, will trigger
501
this operation as well.
502
.It Ic send Ar arguments
503
Send one or more special
505
protocol character sequences to the remote host. The following are
506
the codes which may be specified (more than one may be used in one
509
.Bl -tag -width escape
513
(Abort Processes) sequence.
517
(Abort Output) sequence, which should cause the remote system to flush
526
(Are You There?) sequence, to which the remote system may or may not
531
(Break) sequence, which may have significance to the remote
537
sequence, which should cause the remote system to erase the last character
543
sequence, which should cause the remote system to erase the line currently
563
sequence, which likely has no significance to the remote system.
565
If the remote side supports the
569
will send the subnegotiation to request that the server send
570
its current option status.
574
(Interrupt Process) sequence, which should cause the remote
575
system to abort the currently running process.
590
This sequence causes the remote system to discard all previously typed
591
(but not yet read) input.
592
This sequence is sent as
595
data (and may not work if the remote system is a
598
it doesn't work, a lower case \*(Lqr\*(Rq may be echoed on the terminal).
608
can be either a decimal number between 0 and 255,
609
or a symbolic name for a specific
617
to print out help information, including
618
a list of known symbolic names.
620
Prints out help information for the
624
.It Ic set Ar argument value
625
.It Ic unset Ar argument value
628
command will set any one of a number of
630
variables to a specific value or to
634
turns off the function associated with
635
the variable. This is equivalent to using the
640
command will disable or set to
642
any of the specified variables.
643
The values of variables may be interrogated with the
646
The variables which may be set or unset, but not toggled, are
647
listed here. In addition, any of the variables for the
649
command may be explicitly set or unset.
650
.Bl -tag -width escape
654
is in localchars mode, or
656
is enabled, and the status character is typed, a
658
sequence is sent to the remote host. The initial value for the "Are
659
You There" character is the terminal's status character.
661
This is the value (initially \*(Lq^E\*(Rq) which, when in
662
\*(Lqline by line\*(Rq mode, toggles between doing local echoing
663
of entered characters (for normal processing), and suppressing
664
echoing of entered characters (for entering, say, a password).
670
or \*(Lqold line by line\*(Rq mode, entering this character
671
as the first character on a line will cause this character to be
672
sent to the remote system.
673
The initial value of the eof character is taken to be the terminal's
688
is operating in \*(Lqcharacter at a time\*(Rq mode, then when this
689
character is typed, a
695
is sent to the remote system.
696
The initial value for the erase character is taken to be
703
escape character (initially \*(Lq^[\*(Rq) which causes entry
706
command mode (when connected to a remote system).
718
character is typed, a
724
is sent to the remote host.
725
The initial value for the flush character is taken to be
736
characters that, when typed, cause partial lines to be
737
forwarded to the remote system. The initial value for
738
the forwarding characters are taken from the terminal's
739
eol and eol2 characters.
751
character is typed, a
757
is sent to the remote host.
758
The initial value for the interrupt character is taken to be
774
is operating in \*(Lqcharacter at a time\*(Rq mode, then when this
775
character is typed, a
781
is sent to the remote system.
782
The initial value for the kill character is taken to be
791
or \*(Lqold line by line\*(Lq mode, then this character is taken to
795
The initial value for the lnext character is taken to be
810
character is typed, a
816
is sent to the remote host.
817
The initial value for the quit character is taken to be
826
or \*(Lqold line by line\*(Lq mode, then this character is taken to
830
The initial value for the reprint character is taken to be
835
This is the rlogin mode escape character. Setting it enables rlogin
838
command-line option (q.v.)
841
.Dv TELNET TOGGLE-FLOW-CONTROL
842
option has been enabled,
843
then this character is taken to
847
The initial value for the kill character is taken to be
853
.Dv TELNET TOGGLE-FLOW-CONTROL
854
option has been enabled,
855
then this character is taken to
859
The initial value for the kill character is taken to be
872
character is typed, a
878
is sent to the remote host.
879
The initial value for the suspend character is taken to be
884
This is the file to which the output, caused by
890
will be written. If it is set to
892
then tracing information will be written to standard output (the default).
898
or \*(Lqold line by line\*(Lq mode, then this character is taken to
902
The initial value for the worderase character is taken to be
915
command (Set Local Characters) is used to set
916
or change the state of the the special
920
been enabled. Special characters are characters that get
923
commands sequences (like
927
or line editing characters (like
931
By default, the local special characters are exported.
934
Verify the current settings for the current special characters.
935
The remote side is requested to send all the current special
936
character settings, and if there are any discrepancies with
937
the local side, the local side will switch to the remote value.
939
Switch to the local defaults for the special characters. The
940
local default characters are those of the local terminal at
945
Switch to the remote defaults for the special characters.
946
The remote default characters are those of the remote system
949
connection was established.
951
Prints out help information for the
956
Show the current status of
958
This includes the name of the remote host, if any, as well as the
960
.It Ic toggle Ar arguments ...
965
various flags that control how
968
These flags may be set explicitly to
977
More than one flag may be toggled at once.
978
The state of these flags may be examined with the
984
Turns on debugging for the authentication code. This flag only exists
985
if authentication support is enabled.
997
characters are recognized (and transformed into
1003
refuses to display any data on the user's terminal
1004
until the remote system acknowledges (via a
1005
.Dv TELNET TIMING MARK
1007
that it has processed those
1010
The initial value for this toggle is
1012
if the terminal user had not
1013
done an "stty noflsh", otherwise
1020
option is negotiated, by
1021
default the actual encryption (decryption) of the data
1022
stream does not start automatically. The autoencrypt
1023
(autodecrypt) command states that encryption of the
1024
output (input) stream should be enabled as soon as
1027
Note that this flag exists only if encryption support is enabled.
1029
If the remote side supports the
1030
.Dv TELNET AUTHENTICATION
1033
attempts to use it to perform automatic authentication. If the
1034
.Dv TELNET AUTHENTICATION
1035
option is not supported, the user's login name is propagated using the
1038
Setting this flag is the same as specifying the
1042
command or on the command line.
1050
then when either the
1054
characters is typed (see
1056
above for descriptions of the
1060
characters), the resulting
1062
sequence sent is followed by the
1067
cause the remote system to begin throwing away all previously
1068
typed input until both of the
1070
sequences have been read and acted upon.
1071
The initial value of this toggle is
1074
Enable or disable the
1076
option on both input and output.
1078
Enable or disable the
1082
Enable or disable the
1088
then carriage returns will be sent as
1092
then carriage returns will be send as
1094
The initial value for this toggle is
1097
Toggle carriage return mode.
1098
When this mode is enabled, most carriage return characters received from
1099
the remote host will be mapped into a carriage return followed by
1101
This mode does not affect those characters typed by the user, only
1102
those received from the remote host.
1103
This mode is not very useful unless the remote host
1104
only sends carriage return, but never line feed.
1105
The initial value for this toggle is
1108
Toggles socket level debugging (useful only to the
1110
The initial value for this toggle is
1113
Turns on debugging information for the encryption code.
1114
Note that this flag only exists if encryption support is available.
1127
above) are recognized locally, and transformed into (hopefully) appropriate
1140
The initial value for this toggle is
1142
in \*(Lqold line by line\*(Rq mode,
1145
in \*(Lqcharacter at a time\*(Rq mode.
1148
option is enabled, the value of
1150
is ignored, and assumed to always be
1154
has ever been enabled, then
1168
Toggles the display of all network data (in hexadecimal format).
1169
The initial value for this toggle is
1172
Toggles the display of some internal
1174
protocol processing (having to do with
1177
The initial value for this toggle is
1182
toggle is enabled, if
1184
is enabled the output from the
1186
command will be formatted in a more user-readable format.
1187
Spaces are put between each character in the output, and the
1190
escape sequences are preceded by a '*' to aid in locating them.
1192
When the skiprc toggle is
1195
does not read the telnetrc files. The initial value for this toggle is
1198
Toggles the display of all terminal data (in hexadecimal format).
1199
The initial value for this toggle is
1201
.It Ic verbose_encrypt
1207
prints out a message each time encryption is enabled or
1208
disabled. The initial value for this toggle is
1210
This flag only exists if encryption support is available.
1219
This command only works when the user is using the
1221
.It Ic \&! Op Ar command
1222
Execute a single command in a subshell on the local
1225
is omitted, then an interactive subshell is invoked.
1226
.It Ic \&? Op Ar command
1227
Get help. With no arguments,
1229
prints a help summary.
1230
If a command is specified,
1232
will print the help information for just that command.
1242
environment variables.
1243
Other environment variables may be propagated
1244
to the other side via the
1248
.Bl -tag -width /etc/telnetrc -compact
1249
.It Pa /etc/telnetrc
1250
global telnet startup values
1252
user customized telnet startup values
1261
On some remote systems, echo has to be turned off manually when in
1262
\*(Lqold line by line\*(Rq mode.
1264
In \*(Lqold line by line\*(Rq mode or
1268
character is only recognized (and sent to the remote system)
1269
when it is the first character on a line.
1271
The source code is not comprehensible.