OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [uclinux/] [userland/] [telnet/] [telnet.1] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 763 simons
.\" Copyright (c) 1983, 1990, 1993
2
.\"     The Regents of the University of California.  All rights reserved.
3
.\"
4
.\" Redistribution and use in source and binary forms, with or without
5
.\" modification, are permitted provided that the following conditions
6
.\" are met:
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.
19
.\"
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
30
.\" SUCH DAMAGE.
31
.\"
32
.\"     @(#)telnet.1    8.5 (Berkeley) 3/1/94
33
.\"     $Id: telnet.1,v 1.1 2002-03-25 22:32:02 simons Exp $
34
.\"
35
.Dd March 1, 1994
36
.Dt TELNET 1
37
.Os BSD 4.2
38
.Sh NAME
39
.Nm telnet
40
.Nd user interface to the
41
.Tn TELNET
42
protocol
43
.Sh SYNOPSIS
44
.Nm
45
.Op Fl 8EFKLacdfrx
46
.Op Fl S Ar tos
47
.Op Fl X Ar authtype
48
.Op Fl e Ar escapechar
49
.Op Fl k Ar realm
50
.Op Fl l Ar user
51
.Op Fl n Ar tracefile
52
.Oo
53
.Ar host
54
.Op Ar port
55
.Oc
56
.Sh DESCRIPTION
57
The
58
.Nm
59
command
60
is used to communicate with another host using the
61
.Tn TELNET
62
protocol.
63
If
64
.Nm
65
is invoked without the
66
.Ar host
67
argument, it enters command mode,
68
indicated by its prompt
69
.Pq Nm telnet\&> .
70
In this mode, it accepts and executes the commands listed below.
71
If it is invoked with arguments, it performs an
72
.Ic open
73
command with those arguments.
74
.Pp
75
Options:
76
.Bl -tag -width indent
77
.It Fl 8
78
Specifies an 8-bit data path.  This causes an attempt to
79
negotiate the
80
.Dv TELNET BINARY
81
option on both input and output.
82
.It Fl E
83
Stops any character from being recognized as an escape character.
84
.It Fl F
85
If Kerberos V5 authentication is being used, the
86
.Fl F
87
option allows the local credentials to be forwarded
88
to the remote system, including any credentials that
89
have already been forwarded into the local environment.
90
.It Fl K
91
Specifies no automatic login to the remote system.
92
.It Fl L
93
Specifies an 8-bit data path on output.  This causes the
94
.Dv BINARY
95
option to be negotiated on output.
96
.It Fl N
97
Prevents IP address to name lookup when destination host is given
98
as an IP address.
99
.It Fl S Ar tos
100
Sets the IP type-of-service (TOS) option for the telnet
101
connection to the value
102
.Ar tos,
103
which can be a numeric TOS value
104
or, on systems that support it, a symbolic
105
TOS name found in the
106
.Pa /etc/iptos
107
file.
108
.It Fl X Ar atype
109
Disables the
110
.Ar atype
111
type of authentication.
112
.It Fl a
113
Attempt automatic login.
114
Currently, this sends the user name via the
115
.Ev USER
116
variable
117
of the
118
.Ev ENVIRON
119
option if supported by the remote system.
120
The name used is that of the current user as returned by
121
.Xr getlogin 2
122
if it agrees with the current user ID,
123
otherwise it is the name associated with the user ID.
124
.It Fl c
125
Disables the reading of the user's
126
.Pa \&.telnetrc
127
file.  (See the
128
.Ic toggle skiprc
129
command on this man page.)
130
.It Fl d
131
Sets the initial value of the
132
.Ic debug
133
toggle to
134
.Dv TRUE .
135
.It Fl e Ar escapechar
136
Sets the initial
137
.Nm
138
escape character to
139
.Ar escapechar .
140
If
141
.Ar escapechar
142
is omitted, then
143
there will be no escape character.
144
.It Fl f
145
If Kerberos V5 authentication is being used, the
146
.Fl f
147
option allows the local credentials to be forwarded to the remote system.
148
.It Fl k Ar realm
149
If Kerberos authentication is being used, the
150
.Fl k
151
option requests that
152
.Nm
153
obtain tickets for the remote host in
154
realm
155
.Ar realm
156
instead of the remote host's realm, as determined by
157
.Xr krb_realmofhost 3 .
158
.It Fl l Ar user
159
When connecting to the remote system, if the remote system
160
understands the
161
.Ev ENVIRON
162
option, then
163
.Ar user
164
will be sent to the remote system as the value for the variable
165
.Ev USER .
166
This option implies the
167
.Fl a
168
option.
169
This option may also be used with the
170
.Ic open
171
command.
172
.It Fl n Ar tracefile
173
Opens
174
.Ar tracefile
175
for recording trace information.
176
See the
177
.Ic set tracefile
178
command below.
179
.It Fl r
180
Specifies a user interface similar to
181
.Xr rlogin 1 .
182
In this
183
mode, the escape character is set to the tilde (~) character,
184
unless modified by the
185
.Fl e
186
option.
187
.It Fl x
188
Turns on encryption of the data stream if possible.  This
189
option is not available outside of the United States and
190
Canada.
191
.It Ar host
192
Indicates the official name, an alias, or the Internet address
193
of a remote host.
194
.It Ar port
195
Indicates a port number (address of an application).  If a number is
196
not specified, the default
197
.Nm
198
port is used.
199
.El
200
.Pp
201
When in rlogin mode, a line of the form ~.  disconnects from the
202
remote host; ~ is the
203
.Nm
204
escape character.
205
Similarly, the line ~^Z suspends the
206
.Nm
207
session.
208
The line ~^] escapes to the normal
209
.Nm
210
escape prompt.
211
.Pp
212
Once a connection has been opened,
213
.Nm
214
will attempt to enable the
215
.Dv TELNET LINEMODE
216
option.
217
If this fails, then
218
.Nm
219
will revert to one of two input modes:
220
either \*(Lqcharacter at a time\*(Rq
221
or \*(Lqold line by line\*(Rq
222
depending on what the remote system supports.
223
.Pp
224
When
225
.Dv LINEMODE
226
is enabled, character processing is done on the
227
local system, under the control of the remote system.  When input
228
editing or character echoing is to be disabled, the remote system
229
will relay that information.  The remote system will also relay
230
changes to any special characters that happen on the remote
231
system, so that they can take effect on the local system.
232
.Pp
233
In \*(Lqcharacter at a time\*(Rq mode, most
234
text typed is immediately sent to the remote host for processing.
235
.Pp
236
In \*(Lqold line by line\*(Rq mode, all text is echoed locally,
237
and (normally) only completed lines are sent to the remote host.
238
The \*(Lqlocal echo character\*(Rq (initially \*(Lq^E\*(Rq) may be used
239
to turn off and on the local echo
240
(this would mostly be used to enter passwords
241
without the password being echoed).
242
.Pp
243
If the
244
.Dv LINEMODE
245
option is enabled, or if the
246
.Ic localchars
247
toggle is
248
.Dv TRUE
249
(the default for \*(Lqold line by line\*(Rq; see below),
250
the user's
251
.Ic quit  ,
252
.Ic intr ,
253
and
254
.Ic flush
255
characters are trapped locally, and sent as
256
.Tn TELNET
257
protocol sequences to the remote side.
258
If
259
.Dv LINEMODE
260
has ever been enabled, then the user's
261
.Ic susp
262
and
263
.Ic eof
264
are also sent as
265
.Tn TELNET
266
protocol sequences,
267
and
268
.Ic quit
269
is sent as a
270
.Dv TELNET ABORT
271
instead of
272
.Dv BREAK .
273
There are options (see
274
.Ic toggle
275
.Ic autoflush
276
and
277
.Ic toggle
278
.Ic autosynch
279
below)
280
which cause this action to flush subsequent output to the terminal
281
(until the remote host acknowledges the
282
.Tn TELNET
283
sequence) and flush previous terminal input
284
(in the case of
285
.Ic quit
286
and
287
.Ic intr  ) .
288
.Pp
289
While connected to a remote host,
290
.Nm
291
command mode may be entered by typing the
292
.Nm
293
\*(Lqescape character\*(Rq (initially \*(Lq^]\*(Rq).
294
When in command mode, the normal terminal editing conventions are available.
295
.Pp
296
The following
297
.Nm
298
commands are available.
299
Only enough of each command to uniquely identify it need be typed
300
(this is also true for arguments to the
301
.Ic mode  ,
302
.Ic set ,
303
.Ic toggle  ,
304
.Ic unset ,
305
.Ic slc  ,
306
.Ic environ ,
307
and
308
.Ic display
309
commands).
310
.Pp
311
.Bl -tag -width "mode type"
312
.It Ic auth Ar argument ...
313
The auth command manipulates the information sent through the
314
.Dv TELNET AUTHENTICATE
315
option.  Valid arguments for the
316
.Ic auth
317
command are:
318
.Bl -tag -width "disable type"
319
.It Ic disable Ar type
320
Disables the specified type of authentication.  To
321
obtain a list of available types, use the
322
.Ic auth disable \&?
323
command.
324
.It Ic enable Ar type
325
Enables the specified type of authentication.  To
326
obtain a list of available types, use the
327
.Ic auth enable \&?
328
command.
329
.It Ic status
330
Lists the current status of the various types of
331
authentication.
332
.El
333
.It Ic close
334
Close a
335
.Tn TELNET
336
session and return to command mode.
337
.It Ic display Ar argument ...
338
Displays all, or some, of the
339
.Ic set
340
and
341
.Ic toggle
342
values (see below).
343
.It Ic encrypt Ar argument ...
344
The encrypt command manipulates the information sent through the
345
.Dv TELNET ENCRYPT
346
option.
347
.Pp
348
Note:  Because of export controls, the
349
.Dv TELNET ENCRYPT
350
option is not supported outside of the United States and Canada.
351
.Pp
352
Valid arguments for the
353
.Ic encrypt
354
command are:
355
.Bl -tag -width Ar
356
.It Ic disable Ar type Ic [input|output]
357
Disables the specified type of encryption.  If you
358
omit the input and output, both input and output
359
are disabled.  To obtain a list of available
360
types, use the
361
.Ic encrypt disable \&?
362
command.
363
.It Ic enable Ar type Ic [input|output]
364
Enables the specified type of encryption.  If you
365
omit input and output, both input and output are
366
enabled.  To obtain a list of available types, use the
367
.Ic encrypt enable \&?
368
command.
369
.It Ic input
370
This is the same as the
371
.Ic encrypt start input
372
command.
373
.It Ic -input
374
This is the same as the
375
.Ic encrypt stop input
376
command.
377
.It Ic output
378
This is the same as the
379
.Ic encrypt start output
380
command.
381
.It Ic -output
382
This is the same as the
383
.Ic encrypt stop output
384
command.
385
.It Ic start Ic [input|output]
386
Attempts to start encryption.  If you omit
387
.Ic input
388
and
389
.Ic output,
390
both input and output are enabled.  To
391
obtain a list of available types, use the
392
.Ic encrypt enable \&?
393
command.
394
.It Ic status
395
Lists the current status of encryption.
396
.It Ic stop Ic [input|output]
397
Stops encryption.  If you omit input and output,
398
encryption is on both input and output.
399
.It Ic type Ar type
400
Sets the default type of encryption to be used
401
with later
402
.Ic encrypt start
403
or
404
.Ic encrypt stop
405
commands.
406
.El
407
.It Ic environ Ar arguments...
408
The
409
.Ic environ
410
command is used to manipulate the
411
variables that my be sent through the
412
.Dv TELNET ENVIRON
413
option.
414
The initial set of variables is taken from the users
415
environment, with only the
416
.Ev DISPLAY
417
and
418
.Ev PRINTER
419
variables being exported by default.
420
The
421
.Ev USER
422
variable is also exported if the
423
.Fl a
424
or
425
.Fl l
426
options are used.
427
.Pp
428
Valid arguments for the
429
.Ic environ
430
command are:
431
.Bl -tag -width Fl
432
.It Ic define Ar variable value
433
Define the variable
434
.Ar variable
435
to have a value of
436
.Ar value.
437
Any variables defined by this command are automatically exported.
438
The
439
.Ar value
440
may be enclosed in single or double quotes so
441
that tabs and spaces may be included.
442
.It Ic undefine Ar variable
443
Remove
444
.Ar variable
445
from the list of environment variables.
446
.It Ic export Ar variable
447
Mark the variable
448
.Ar variable
449
to be exported to the remote side.
450
.It Ic unexport Ar variable
451
Mark the variable
452
.Ar variable
453
to not be exported unless
454
explicitly asked for by the remote side.
455
.It Ic list
456
List the current set of environment variables.
457
Those marked with a
458
.Cm *
459
will be sent automatically,
460
other variables will only be sent if explicitly requested.
461
.It Ic \&?
462
Prints out help information for the
463
.Ic environ
464
command.
465
.El
466
.It Ic logout
467
Sends the
468
.Dv TELNET LOGOUT
469
option to the remote side.
470
This command is similar to a
471
.Ic close
472
command; however, if the remote side does not support the
473
.Dv LOGOUT
474
option, nothing happens.
475
If, however, the remote side does support the
476
.Dv LOGOUT
477
option, this command should cause the remote side to close the
478
.Tn TELNET
479
connection.
480
If the remote side also supports the concept of
481
suspending a user's session for later reattachment,
482
the logout argument indicates that you
483
should terminate the session immediately.
484
.It Ic mode Ar type
485
.Ar Type
486
is one of several options, depending on the state of the
487
.Tn TELNET
488
session.
489
The remote host is asked for permission to go into the requested mode.
490
If the remote host is capable of entering that mode, the requested
491
mode will be entered.
492
.Bl -tag -width Ar
493
.It Ic character
494
Disable the
495
.Dv TELNET LINEMODE
496
option, or, if the remote side does not understand the
497
.Dv LINEMODE
498
option, then enter \*(Lqcharacter at a time\*(Rq mode.
499
.It Ic line
500
Enable the
501
.Dv TELNET LINEMODE
502
option, or, if the remote side does not understand the
503
.Dv LINEMODE
504
option, then attempt to enter \*(Lqold-line-by-line\*(Rq mode.
505
.It Ic isig Pq Ic \-isig
506
Attempt to enable (disable) the
507
.Dv TRAPSIG
508
mode of the
509
.Dv LINEMODE
510
option.
511
This requires that the
512
.Dv LINEMODE
513
option be enabled.
514
.It Ic edit Pq Ic \-edit
515
Attempt to enable (disable) the
516
.Dv EDIT
517
mode of the
518
.Dv LINEMODE
519
option.
520
This requires that the
521
.Dv LINEMODE
522
option be enabled.
523
.It Ic softtabs Pq Ic \-softtabs
524
Attempt to enable (disable) the
525
.Dv SOFT_TAB
526
mode of the
527
.Dv LINEMODE
528
option.
529
This requires that the
530
.Dv LINEMODE
531
option be enabled.
532
.It Ic litecho Pq Ic \-litecho
533
Attempt to enable (disable) the
534
.Dv LIT_ECHO
535
mode of the
536
.Dv LINEMODE
537
option.
538
This requires that the
539
.Dv LINEMODE
540
option be enabled.
541
.It Ic \&?
542
Prints out help information for the
543
.Ic mode
544
command.
545
.El
546
.It Xo
547
.Ic open Ar host
548
.Op Fl l Ar user
549
.Oo Op Fl
550
.Ar port Oc
551
.Xc
552
Open a connection to the named host.
553
If no port number
554
is specified,
555
.Nm
556
will attempt to contact a
557
.Tn TELNET
558
server at the default port.
559
The host specification may be either a host name (see
560
.Xr hosts  5  )
561
or an Internet address specified in the \*(Lqdot notation\*(Rq (see
562
.Xr inet 3 ) .
563
The
564
.Fl l
565
option may be used to specify the user name
566
to be passed to the remote system via the
567
.Ev ENVIRON
568
option.
569
When connecting to a non-standard port,
570
.Nm
571
omits any automatic initiation of
572
.Tn TELNET
573
options.  When the port number is preceded by a minus sign,
574
the initial option negotiation is done.
575
After establishing a connection, the file
576
.Pa \&.telnetrc
577
in the
578
users home directory is opened.  Lines beginning with a # are
579
comment lines.  Blank lines are ignored.  Lines that begin
580
without white space are the start of a machine entry.  The
581
first thing on the line is the name of the machine that is
582
being connected to.  The rest of the line, and successive
583
lines that begin with white space are assumed to be
584
.Nm
585
commands and are processed as if they had been typed
586
in manually to the
587
.Nm
588
command prompt.
589
.It Ic quit
590
Close any open
591
.Tn TELNET
592
session and exit
593
.Nm telnet  .
594
An end of file (in command mode) will also close a session and exit.
595
.It Ic send Ar arguments
596
Sends one or more special character sequences to the remote host.
597
The following are the arguments which may be specified
598
(more than one argument may be specified at a time):
599
.Pp
600
.Bl -tag -width escape
601
.It Ic abort
602
Sends the
603
.Dv TELNET ABORT
604
(Abort
605
processes)
606
sequence.
607
.It Ic ao
608
Sends the
609
.Dv TELNET AO
610
(Abort Output) sequence, which should cause the remote system to flush
611
all output
612
.Em from
613
the remote system
614
.Em to
615
the user's terminal.
616
.It Ic ayt
617
Sends the
618
.Dv TELNET AYT
619
(Are You There)
620
sequence, to which the remote system may or may not choose to respond.
621
.It Ic brk
622
Sends the
623
.Dv TELNET BRK
624
(Break) sequence, which may have significance to the remote
625
system.
626
.It Ic ec
627
Sends the
628
.Dv TELNET EC
629
(Erase Character)
630
sequence, which should cause the remote system to erase the last character
631
entered.
632
.It Ic el
633
Sends the
634
.Dv TELNET EL
635
(Erase Line)
636
sequence, which should cause the remote system to erase the line currently
637
being entered.
638
.It Ic eof
639
Sends the
640
.Dv TELNET EOF
641
(End Of File)
642
sequence.
643
.It Ic eor
644
Sends the
645
.Dv TELNET EOR
646
(End of Record)
647
sequence.
648
.It Ic escape
649
Sends the current
650
.Nm
651
escape character (initially \*(Lq^\*(Rq).
652
.It Ic ga
653
Sends the
654
.Dv TELNET GA
655
(Go Ahead)
656
sequence, which likely has no significance to the remote system.
657
.It Ic getstatus
658
If the remote side supports the
659
.Dv TELNET STATUS
660
command,
661
.Ic getstatus
662
will send the subnegotiation to request that the server send
663
its current option status.
664
.It Ic ip
665
Sends the
666
.Dv TELNET IP
667
(Interrupt Process) sequence, which should cause the remote
668
system to abort the currently running process.
669
.It Ic nop
670
Sends the
671
.Dv TELNET NOP
672
(No OPeration)
673
sequence.
674
.It Ic susp
675
Sends the
676
.Dv TELNET SUSP
677
(SUSPend process)
678
sequence.
679
.It Ic synch
680
Sends the
681
.Dv TELNET SYNCH
682
sequence.
683
This sequence causes the remote system to discard all previously typed
684
(but not yet read) input.
685
This sequence is sent as
686
.Tn TCP
687
urgent
688
data (and may not work if the remote system is a
689
.Bx 4.2
690
system -- if
691
it doesn't work, a lower case \*(Lqr\*(Rq may be echoed on the terminal).
692
.It Ic do Ar cmd
693
.It Ic dont Ar cmd
694
.It Ic will Ar cmd
695
.It Ic wont Ar cmd
696
Sends the
697
.Dv TELNET DO
698
.Ar cmd
699
sequence.
700
.Ar Cmd
701
can be either a decimal number between 0 and 255,
702
or a symbolic name for a specific
703
.Dv TELNET
704
command.
705
.Ar Cmd
706
can also be either
707
.Ic help
708
or
709
.Ic \&?
710
to print out help information, including
711
a list of known symbolic names.
712
.It Ic \&?
713
Prints out help information for the
714
.Ic send
715
command.
716
.El
717
.It Ic set Ar argument value
718
.It Ic unset Ar argument value
719
The
720
.Ic set
721
command will set any one of a number of
722
.Nm
723
variables to a specific value or to
724
.Dv TRUE .
725
The special value
726
.Ic off
727
turns off the function associated with
728
the variable, this is equivalent to using the
729
.Ic unset
730
command.
731
The
732
.Ic unset
733
command will disable or set to
734
.Dv FALSE
735
any of the specified functions.
736
The values of variables may be interrogated with the
737
.Ic display
738
command.
739
The variables which may be set or unset, but not toggled, are
740
listed here.  In addition, any of the variables for the
741
.Ic toggle
742
command may be explicitly set or unset using
743
the
744
.Ic set
745
and
746
.Ic unset
747
commands.
748
.Bl -tag -width escape
749
.It Ic ayt
750
If
751
.Tn TELNET
752
is in localchars mode, or
753
.Dv LINEMODE
754
is enabled, and the status character is typed, a
755
.Dv TELNET AYT
756
sequence (see
757
.Ic send ayt
758
preceding) is sent to the
759
remote host.  The initial value for the \*(LqAre You There\*(Rq
760
character is the terminal's status character.
761
.It Ic echo
762
This is the value (initially \*(Lq^E\*(Rq) which, when in
763
\*(Lqline by line\*(Rq mode, toggles between doing local echoing
764
of entered characters (for normal processing), and suppressing
765
echoing of entered characters (for entering, say, a password).
766
.It Ic eof
767
If
768
.Nm
769
is operating in
770
.Dv LINEMODE
771
or \*(Lqold line by line\*(Rq mode, entering this character
772
as the first character on a line will cause this character to be
773
sent to the remote system.
774
The initial value of the eof character is taken to be the terminal's
775
.Ic eof
776
character.
777
.It Ic erase
778
If
779
.Nm
780
is in
781
.Ic localchars
782
mode (see
783
.Ic toggle
784
.Ic localchars
785
below),
786
.Sy and
787
if
788
.Nm
789
is operating in \*(Lqcharacter at a time\*(Rq mode, then when this
790
character is typed, a
791
.Dv TELNET EC
792
sequence (see
793
.Ic send
794
.Ic ec
795
above)
796
is sent to the remote system.
797
The initial value for the erase character is taken to be
798
the terminal's
799
.Ic erase
800
character.
801
.It Ic escape
802
This is the
803
.Nm
804
escape character (initially \*(Lq^[\*(Rq) which causes entry
805
into
806
.Nm
807
command mode (when connected to a remote system).
808
.It Ic flushoutput
809
If
810
.Nm
811
is in
812
.Ic localchars
813
mode (see
814
.Ic toggle
815
.Ic localchars
816
below)
817
and the
818
.Ic flushoutput
819
character is typed, a
820
.Dv TELNET AO
821
sequence (see
822
.Ic send
823
.Ic ao
824
above)
825
is sent to the remote host.
826
The initial value for the flush character is taken to be
827
the terminal's
828
.Ic flush
829
character.
830
.It Ic forw1
831
.It Ic forw2
832
If
833
.Nm
834
is operating in
835
.Dv LINEMODE ,
836
these are the
837
characters that, when typed, cause partial lines to be
838
forwarded to the remote system.  The initial value for
839
the forwarding characters are taken from the terminal's
840
eol and eol2 characters.
841
.It Ic interrupt
842
If
843
.Nm
844
is in
845
.Ic localchars
846
mode (see
847
.Ic toggle
848
.Ic localchars
849
below)
850
and the
851
.Ic interrupt
852
character is typed, a
853
.Dv TELNET IP
854
sequence (see
855
.Ic send
856
.Ic ip
857
above)
858
is sent to the remote host.
859
The initial value for the interrupt character is taken to be
860
the terminal's
861
.Ic intr
862
character.
863
.It Ic kill
864
If
865
.Nm
866
is in
867
.Ic localchars
868
mode (see
869
.Ic toggle
870
.Ic localchars
871
below),
872
.Ic and
873
if
874
.Nm
875
is operating in \*(Lqcharacter at a time\*(Rq mode, then when this
876
character is typed, a
877
.Dv TELNET EL
878
sequence (see
879
.Ic send
880
.Ic el
881
above)
882
is sent to the remote system.
883
The initial value for the kill character is taken to be
884
the terminal's
885
.Ic kill
886
character.
887
.It Ic lnext
888
If
889
.Nm
890
is operating in
891
.Dv LINEMODE
892
or \*(Lqold line by line\*(Rq mode, then this character is taken to
893
be the terminal's
894
.Ic lnext
895
character.
896
The initial value for the lnext character is taken to be
897
the terminal's
898
.Ic lnext
899
character.
900
.It Ic quit
901
If
902
.Nm
903
is in
904
.Ic localchars
905
mode (see
906
.Ic toggle
907
.Ic localchars
908
below)
909
and the
910
.Ic quit
911
character is typed, a
912
.Dv TELNET BRK
913
sequence (see
914
.Ic send
915
.Ic brk
916
above)
917
is sent to the remote host.
918
The initial value for the quit character is taken to be
919
the terminal's
920
.Ic quit
921
character.
922
.It Ic reprint
923
If
924
.Nm
925
is operating in
926
.Dv LINEMODE
927
or \*(Lqold line by line\*(Rq mode, then this character is taken to
928
be the terminal's
929
.Ic reprint
930
character.
931
The initial value for the reprint character is taken to be
932
the terminal's
933
.Ic reprint
934
character.
935
.It Ic rlogin
936
This is the rlogin escape character.
937
If set, the normal
938
.Nm
939
escape character is ignored unless it is
940
preceded by this character at the beginning of a line.
941
This character, at the beginning of a line followed by
942
a "."  closes the connection; when followed by a ^Z it
943
suspends the
944
.Nm
945
command.  The initial state is to
946
disable the
947
.Nm rlogin
948
escape character.
949
.It Ic start
950
If the
951
.Dv TELNET TOGGLE-FLOW-CONTROL
952
option has been enabled,
953
then this character is taken to
954
be the terminal's
955
.Ic start
956
character.
957
The initial value for the start character is taken to be
958
the terminal's
959
.Ic start
960
character.
961
.It Ic stop
962
If the
963
.Dv TELNET TOGGLE-FLOW-CONTROL
964
option has been enabled,
965
then this character is taken to
966
be the terminal's
967
.Ic stop
968
character.
969
The initial value for the stop character is taken to be
970
the terminal's
971
.Ic stop
972
character.
973
.It Ic susp
974
If
975
.Nm
976
is in
977
.Ic localchars
978
mode, or
979
.Dv LINEMODE
980
is enabled, and the
981
.Ic suspend
982
character is typed, a
983
.Dv TELNET SUSP
984
sequence (see
985
.Ic send
986
.Ic susp
987
above)
988
is sent to the remote host.
989
The initial value for the suspend character is taken to be
990
the terminal's
991
.Ic suspend
992
character.
993
.It Ic tracefile
994
This is the file to which the output, caused by
995
.Ic netdata
996
or
997
.Ic option
998
tracing being
999
.Dv TRUE ,
1000
will be written.  If it is set to
1001
.Dq Fl ,
1002
then tracing information will be written to standard output (the default).
1003
.It Ic worderase
1004
If
1005
.Nm
1006
is operating in
1007
.Dv LINEMODE
1008
or \*(Lqold line by line\*(Rq mode, then this character is taken to
1009
be the terminal's
1010
.Ic worderase
1011
character.
1012
The initial value for the worderase character is taken to be
1013
the terminal's
1014
.Ic worderase
1015
character.
1016
.It Ic \&?
1017
Displays the legal
1018
.Ic set
1019
.Pq Ic unset
1020
commands.
1021
.El
1022
.It Ic slc Ar state
1023
The
1024
.Ic slc
1025
command (Set Local Characters) is used to set
1026
or change the state of the special
1027
characters when the
1028
.Dv TELNET LINEMODE
1029
option has
1030
been enabled.  Special characters are characters that get
1031
mapped to
1032
.Tn TELNET
1033
commands sequences (like
1034
.Ic ip
1035
or
1036
.Ic quit  )
1037
or line editing characters (like
1038
.Ic erase
1039
and
1040
.Ic kill  ) .
1041
By default, the local special characters are exported.
1042
.Bl -tag -width Fl
1043
.It Ic check
1044
Verify the current settings for the current special characters.
1045
The remote side is requested to send all the current special
1046
character settings, and if there are any discrepancies with
1047
the local side, the local side will switch to the remote value.
1048
.It Ic export
1049
Switch to the local defaults for the special characters.  The
1050
local default characters are those of the local terminal at
1051
the time when
1052
.Nm
1053
was started.
1054
.It Ic import
1055
Switch to the remote defaults for the special characters.
1056
The remote default characters are those of the remote system
1057
at the time when the
1058
.Tn TELNET
1059
connection was established.
1060
.It Ic \&?
1061
Prints out help information for the
1062
.Ic slc
1063
command.
1064
.El
1065
.It Ic status
1066
Show the current status of
1067
.Nm telnet  .
1068
This includes the peer one is connected to, as well
1069
as the current mode.
1070
.It Ic toggle Ar arguments ...
1071
Toggle (between
1072
.Dv TRUE
1073
and
1074
.Dv FALSE )
1075
various flags that control how
1076
.Nm
1077
responds to events.
1078
These flags may be set explicitly to
1079
.Dv TRUE
1080
or
1081
.Dv FALSE
1082
using the
1083
.Ic set
1084
and
1085
.Ic unset
1086
commands listed above.
1087
More than one argument may be specified.
1088
The state of these flags may be interrogated with the
1089
.Ic display
1090
command.
1091
Valid arguments are:
1092
.Bl -tag -width Ar
1093
.It Ic authdebug
1094
Turns on debugging information for the authentication code.
1095
.It Ic autoflush
1096
If
1097
.Ic autoflush
1098
and
1099
.Ic localchars
1100
are both
1101
.Dv TRUE ,
1102
then when the
1103
.Ic ao  ,
1104
or
1105
.Ic quit
1106
characters are recognized (and transformed into
1107
.Tn TELNET
1108
sequences; see
1109
.Ic set
1110
above for details),
1111
.Nm
1112
refuses to display any data on the user's terminal
1113
until the remote system acknowledges (via a
1114
.Dv TELNET TIMING MARK
1115
option)
1116
that it has processed those
1117
.Tn TELNET
1118
sequences.
1119
The initial value for this toggle is
1120
.Dv TRUE
1121
if the terminal user had not
1122
done an "stty noflsh", otherwise
1123
.Dv FALSE
1124
(see
1125
.Xr stty  1  ) .
1126
.It Ic autodecrypt
1127
When the
1128
.Dv TELNET ENCRYPT
1129
option is negotiated, by
1130
default the actual encryption (decryption) of the data
1131
stream does not start automatically.  The autoencrypt
1132
(autodecrypt) command states that encryption of the
1133
output (input) stream should be enabled as soon as
1134
possible.
1135
.Pp
1136
Note:  Because of export controls, the
1137
.Dv TELNET ENCRYPT
1138
option is not supported outside the United States and Canada.
1139
.It Ic autologin
1140
If the remote side supports the
1141
.Dv TELNET AUTHENTICATION
1142
option
1143
.Nm
1144
attempts to use it to perform automatic authentication.  If the
1145
.Dv AUTHENTICATION
1146
option is not supported, the user's login
1147
name are propagated through the
1148
.Dv TELNET ENVIRON
1149
option.
1150
This command is the same as specifying
1151
.Fl a
1152
option on the
1153
.Ic open
1154
command.
1155
.It Ic autosynch
1156
If
1157
.Ic autosynch
1158
and
1159
.Ic localchars
1160
are both
1161
.Dv TRUE ,
1162
then when either the
1163
.Ic intr
1164
or
1165
.Ic quit
1166
characters is typed (see
1167
.Ic set
1168
above for descriptions of the
1169
.Ic intr
1170
and
1171
.Ic quit
1172
characters), the resulting
1173
.Tn TELNET
1174
sequence sent is followed by the
1175
.Dv TELNET SYNCH
1176
sequence.
1177
This procedure
1178
.Ic should
1179
cause the remote system to begin throwing away all previously
1180
typed input until both of the
1181
.Tn TELNET
1182
sequences have been read and acted upon.
1183
The initial value of this toggle is
1184
.Dv FALSE .
1185
.It Ic binary
1186
Enable or disable the
1187
.Dv TELNET BINARY
1188
option on both input and output.
1189
.It Ic inbinary
1190
Enable or disable the
1191
.Dv TELNET BINARY
1192
option on input.
1193
.It Ic outbinary
1194
Enable or disable the
1195
.Dv TELNET BINARY
1196
option on output.
1197
.It Ic crlf
1198
If this is
1199
.Dv TRUE ,
1200
then carriage returns will be sent as
1201
.Li  .
1202
If this is
1203
.Dv FALSE ,
1204
then carriage returns will be send as
1205
.Li  .
1206
The initial value for this toggle is
1207
.Dv FALSE .
1208
.It Ic crmod
1209
Toggle carriage return mode.
1210
When this mode is enabled, most carriage return characters received from
1211
the remote host will be mapped into a carriage return followed by
1212
a line feed.
1213
This mode does not affect those characters typed by the user, only
1214
those received from the remote host.
1215
This mode is not very useful unless the remote host
1216
only sends carriage return, but never line feed.
1217
The initial value for this toggle is
1218
.Dv FALSE .
1219
.It Ic debug
1220
Toggles socket level debugging (useful only to the
1221
.Ic super user  ) .
1222
The initial value for this toggle is
1223
.Dv FALSE .
1224
.It Ic encdebug
1225
Turns on debugging information for the encryption code.
1226
.It Ic localchars
1227
If this is
1228
.Dv TRUE ,
1229
then the
1230
.Ic flush  ,
1231
.Ic interrupt ,
1232
.Ic quit  ,
1233
.Ic erase ,
1234
and
1235
.Ic kill
1236
characters (see
1237
.Ic set
1238
above) are recognized locally, and transformed into (hopefully) appropriate
1239
.Tn TELNET
1240
control sequences
1241
(respectively
1242
.Ic ao  ,
1243
.Ic ip ,
1244
.Ic brk  ,
1245
.Ic ec ,
1246
and
1247
.Ic el  ;
1248
see
1249
.Ic send
1250
above).
1251
The initial value for this toggle is
1252
.Dv TRUE
1253
in \*(Lqold line by line\*(Rq mode,
1254
and
1255
.Dv FALSE
1256
in \*(Lqcharacter at a time\*(Rq mode.
1257
When the
1258
.Dv LINEMODE
1259
option is enabled, the value of
1260
.Ic localchars
1261
is ignored, and assumed to always be
1262
.Dv TRUE .
1263
If
1264
.Dv LINEMODE
1265
has ever been enabled, then
1266
.Ic quit
1267
is sent as
1268
.Ic abort  ,
1269
and
1270
.Ic eof and
1271
.Ic suspend
1272
are sent as
1273
.Ic eof and
1274
.Ic susp
1275
(see
1276
.Ic send
1277
above).
1278
.It Ic netdata
1279
Toggles the display of all network data (in hexadecimal format).
1280
The initial value for this toggle is
1281
.Dv FALSE .
1282
.It Ic options
1283
Toggles the display of some internal
1284
.Nm
1285
protocol processing (having to do with
1286
.Tn TELNET
1287
options).
1288
The initial value for this toggle is
1289
.Dv FALSE .
1290
.It Ic prettydump
1291
When the
1292
.Ic netdata
1293
toggle is enabled, if
1294
.Ic prettydump
1295
is enabled the output from the
1296
.Ic netdata
1297
command will be formatted in a more user readable format.
1298
Spaces are put between each character in the output, and the
1299
beginning of any
1300
.Nm
1301
escape sequence is preceded by a '*' to aid in locating them.
1302
.It Ic skiprc
1303
When the skiprc toggle is
1304
.Dv TRUE ,
1305
.Nm
1306
skips the reading of the
1307
.Pa \&.telnetrc
1308
file in the users home
1309
directory when connections are opened.  The initial
1310
value for this toggle is
1311
.Dv FALSE.
1312
.It Ic termdata
1313
Toggles the display of all terminal data (in hexadecimal format).
1314
The initial value for this toggle is
1315
.Dv FALSE .
1316
.It Ic verbose_encrypt
1317
When the
1318
.Ic verbose_encrypt
1319
toggle is
1320
.Dv TRUE ,
1321
.Nm
1322
prints out a message each time encryption is enabled or
1323
disabled.  The initial value for this toggle is
1324
.Dv FALSE.
1325
Note:  Because of export controls, data encryption
1326
is not supported outside of the United States and Canada.
1327
.It Ic \&?
1328
Displays the legal
1329
.Ic toggle
1330
commands.
1331
.El
1332
.It Ic z
1333
Suspend
1334
.Nm telnet  .
1335
This command only works when the user is using the
1336
.Xr csh  1  .
1337
.It Ic \&! Op Ar command
1338
Execute a single command in a subshell on the local
1339
system.  If
1340
.Ar command
1341
is omitted, then an interactive
1342
subshell is invoked.
1343
.It Ic \&? Op Ar command
1344
Get help.  With no arguments,
1345
.Nm
1346
prints a help summary.
1347
If
1348
.Ar command
1349
is specified,
1350
.Nm
1351
will print the help information for just that command.
1352
.El
1353
.Sh ENVIRONMENT
1354
.Nm
1355
uses at least the
1356
.Ev HOME ,
1357
.Ev SHELL ,
1358
.Ev DISPLAY ,
1359
and
1360
.Ev TERM
1361
environment variables.
1362
Other environment variables may be propagated
1363
to the other side via the
1364
.Dv TELNET ENVIRON
1365
option.
1366
.Sh SEE ALSO
1367
.Xr rlogin 1 ,
1368
.Xr rsh 1 ,
1369
.Xr hosts 5 ,
1370
.Xr nologin 5 ,
1371
.Xr telnetd 8
1372
.Sh FILES
1373
.Bl -tag -width ~/.telnetrc -compact
1374
.It Pa ~/.telnetrc
1375
user customized telnet startup values
1376
.El
1377
.Sh HISTORY
1378
The
1379
.Nm
1380
command appeared in
1381
.Bx 4.2 .
1382
.Sh NOTES
1383
.Pp
1384
On some remote systems, echo has to be turned off manually when in
1385
\*(Lqold line by line\*(Rq mode.
1386
.Pp
1387
In \*(Lqold line by line\*(Rq mode or
1388
.Dv LINEMODE
1389
the terminal's
1390
.Ic eof
1391
character is only recognized (and sent to the remote system)
1392
when it is the first character on a line.

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.