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