|
|
1.1 root 1: .\" Copyright (c) 1983 Regents of the University of California.
2: .\" All rights reserved. The Berkeley software License Agreement
3: .\" specifies the terms and conditions for redistribution.
4: .\"
5: .\" @(#)telnet.1c 6.5 (Berkeley) 5/10/86
6: .\"
7: .TH TELNET 1C "May 10, 1986"
8: .UC 5
9: .SH NAME
10: telnet \- user interface to the \s-1TELNET\s0 protocol
11: .SH SYNOPSIS
12: telnet [ host [ port ] ]
13: .SH DESCRIPTION
14: .I Telnet
15: is used to communicate with another host using the
16: .B TELNET
17: protocol.
18: If
19: .I telnet
20: is invoked without arguments, it enters command mode,
21: indicated by its prompt (\*(lqtelnet>\*(rq).
22: In this mode, it accepts and executes the commands listed below.
23: If it is invoked with arguments, it performs an
24: .B open
25: command (see below) with those arguments.
26: .PP
27: Once a connection has been opened,
28: .I telnet
29: enters an input mode.
30: The input mode entered will be either \*(lqcharacter at a time\*(rq
31: or \*(lqline by line\*(rq
32: depending on what the remote system supports.
33: .PP
34: In \*(lqcharacter at a time\*(rq mode, most
35: text typed is immediately sent to the remote host for processing.
36: .PP
37: In \*(lqline by line\*(rq mode, all text is echoed locally,
38: and (normally) only completed lines are sent to the remote host.
39: The \*(lqlocal echo character\*(rq (initially \*(lq^E\*(rq) may be used
40: to turn off and on the local echo
41: (this would mostly be used to enter passwords
42: without the password being echoed).
43: .PP
44: In either mode, if the
45: .I localchars
46: toggle is TRUE (the default in line mode; see below),
47: the user's
48: .IR quit ,
49: .IR intr ,
50: and
51: .I flush
52: characters are trapped locally, and sent as
53: .B TELNET
54: protocol sequences to the remote side.
55: There are options (see
56: .B toggle
57: .I autoflush
58: and
59: .B toggle
60: .I autosynch
61: below)
62: which cause this action to flush subsequent output to the terminal
63: (until the remote host acknowledges the
64: .B TELNET
65: sequence) and flush previous terminal input
66: (in the case of
67: .I quit
68: and
69: .IR intr ).
70: .PP
71: While connected to a remote host,
72: .I telnet
73: command mode may be entered by typing the
74: .I telnet
75: \*(lqescape character\*(rq (initially \*(lq^]\*(rq).
76: When in command mode, the normal terminal editing conventions are available.
77: .PP
78: .B COMMANDS
79: .PP
80: The following commands are available.
81: Only enough of each command to uniquely identify it need be typed
82: (this is also true for arguments to the
83: .BR mode ,
84: .BR set ,
85: .BR toggle ,
86: and
87: .B display
88: commands).
89: .PP
90: .TP
91: .B open \fIhost\fP \fR[\fP \fIport\fP \fR]\fP
92: .br
93: Open a connection to the named host.
94: If no port number
95: is specified,
96: .I telnet
97: will attempt to contact a
98: .B TELNET
99: server at the default port.
100: The host specification may be either a host name (see
101: .IR hosts (5))
102: or an Internet address specified in the \*(lqdot notation\*(rq (see
103: .IR inet (3N)).
104: .TP
105: .B close
106: .br
107: Close a
108: .B TELNET
109: session and return to command mode.
110: .TP
111: .B quit
112: .br
113: Close any open
114: .B TELNET
115: session and exit
116: .IR telnet .
117: An end of file (in command mode) will also close a session and exit.
118: .TP
119: .B z
120: .br
121: Suspend
122: .IR telnet .
123: This command only works when the user is using the
124: .IR csh (1).
125: .TP
126: .B mode \fItype\fP
127: .br
128: .I Type
129: is either
130: .I line
131: (for \*(lqline by line\*(rq mode)
132: or
133: .I character
134: (for \*(lqcharacter at a time\*(rq mode).
135: The remote host is asked for permission to go into the requested mode.
136: If the remote host is capable of entering that mode, the requested
137: mode will be entered.
138: .TP
139: .B status
140: .br
141: Show the current status of
142: .IR telnet .
143: This includes the peer one is connected to, as well
144: as the current mode.
145: .TP
146: .B display \fR[\fP \fIargument...\fP \fR]\fP
147: .br
148: Displays all, or some, of the
149: .B set
150: and
151: .B toggle
152: values (see below).
153: .TP
154: .B ? \fR[\fP \fIcommand\fP \fR]\fP
155: .br
156: Get help. With no arguments,
157: .I telnet
158: prints a help summary.
159: If a command is specified,
160: .I telnet
161: will print the help information for just that command.
162: .TP
163: .B send \fIarguments\fP
164: .br
165: Sends one or more special character sequences to the remote host.
166: The following are the arguments which may be specified
167: (more than one argument may be specified at a time):
168: .RS
169: .TP
170: .I escape
171: .br
172: Sends the current
173: .I telnet
174: escape character (initially \*(lq^]\*(rq).
175: .TP
176: .I synch
177: .br
178: Sends the
179: .B TELNET SYNCH
180: sequence.
181: This sequence causes the remote system to discard all previously typed
182: (but not yet read) input.
183: This sequence is sent as TCP urgent
184: data (and may not work if the remote system is a 4.2 BSD system -- if
185: it doesn't work, a lower case \*(lqr\*(rq may be echoed on the terminal).
186: .TP
187: .I brk
188: .br
189: Sends the
190: .B TELNET BRK
191: (Break) sequence, which may have significance to the remote
192: system.
193: .TP
194: .I ip
195: .br
196: Sends the
197: .B TELNET IP
198: (Interrupt Process) sequence, which should cause the remote
199: system to abort the currently running process.
200: .TP
201: .I ao
202: .br
203: Sends the
204: .B TELNET AO
205: (Abort Output) sequence, which should cause the remote system to flush
206: all output
207: .B from
208: the remote system
209: .B to
210: the user's terminal.
211: .TP
212: .I ayt
213: .br
214: Sends the
215: .B TELNET AYT
216: (Are You There)
217: sequence, to which the remote system may or may not choose to respond.
218: .TP
219: .I ec
220: .br
221: Sends the
222: .B TELNET EC
223: (Erase Character)
224: sequence, which should cause the remote system to erase the last character
225: entered.
226: .TP
227: .I el
228: .br
229: Sends the
230: .B TELNET EL
231: (Erase Line)
232: sequence, which should cause the remote system to erase the line currently
233: being entered.
234: .TP
235: .I ga
236: .br
237: Sends the
238: .B TELNET GA
239: (Go Ahead)
240: sequence, which likely has no significance to the remote system.
241: .TP
242: .I nop
243: .br
244: Sends the
245: .B TELNET NOP
246: (No OPeration)
247: sequence.
248: .TP
249: .I ?
250: .br
251: Prints out help information for the
252: .B send
253: command.
254: .RE
255: .TP
256: .B set \fIargument value\fP
257: .br
258: Set any one of a number of
259: .I telnet
260: variables to a specific value.
261: The special value \*(lqoff\*(rq turns off the function associated with
262: the variable.
263: The values of variables may be interrogated with the
264: .B display
265: command.
266: The variables which may be specified are:
267: .RS
268: .TP
269: .I echo
270: .br
271: This is the value (initially \*(lq^E\*(rq) which, when in
272: \*(lqline by line\*(rq mode, toggles between doing local echoing
273: of entered characters (for normal processing), and suppressing
274: echoing of entered characters (for entering, say, a password).
275: .TP
276: .I escape
277: .br
278: This is the
279: .I telnet
280: escape character (initially \*(lq^[\*(rq) which causes entry
281: into
282: .I telnet
283: command mode (when connected to a remote system).
284: .TP
285: .I interrupt
286: .br
287: If
288: .I telnet
289: is in
290: .I localchars
291: mode (see
292: .B toggle
293: .I localchars
294: below)
295: and the
296: .I interrupt
297: character is typed, a
298: .B TELNET IP
299: sequence (see
300: .B send
301: .I ip
302: above)
303: is sent to the remote host.
304: The initial value for the interrupt character is taken to be
305: the terminal's
306: .B intr
307: character.
308: .TP
309: .I quit
310: .br
311: If
312: .I telnet
313: is in
314: .I localchars
315: mode (see
316: .B toggle
317: .I localchars
318: below)
319: and the
320: .I quit
321: character is typed, a
322: .B TELNET BRK
323: sequence (see
324: .B send
325: .I brk
326: above)
327: is sent to the remote host.
328: The initial value for the quit character is taken to be
329: the terminal's
330: .B quit
331: character.
332: .TP
333: .I flushoutput
334: .br
335: If
336: .I telnet
337: is in
338: .I localchars
339: mode (see
340: .B toggle
341: .I localchars
342: below)
343: and the
344: .I flushoutput
345: character is typed, a
346: .B TELNET AO
347: sequence (see
348: .B send
349: .I ao
350: above)
351: is sent to the remote host.
352: The initial value for the flush character is taken to be
353: the terminal's
354: .B flush
355: character.
356: .TP
357: .I erase
358: .br
359: If
360: .I telnet
361: is in
362: .I localchars
363: mode (see
364: .B toggle
365: .I localchars
366: below),
367: .B and
368: if
369: .I telnet
370: is operating in \*(lqcharacter at a time\*(rq mode, then when this
371: character is typed, a
372: .B TELNET EC
373: sequence (see
374: .B send
375: .I ec
376: above)
377: is sent to the remote system.
378: The initial value for the erase character is taken to be
379: the terminal's
380: .B erase
381: character.
382: .TP
383: .I kill
384: .br
385: If
386: .I telnet
387: is in
388: .I localchars
389: mode (see
390: .B toggle
391: .I localchars
392: below),
393: .B and
394: if
395: .I telnet
396: is operating in \*(lqcharacter at a time\*(rq mode, then when this
397: character is typed, a
398: .B TELNET EL
399: sequence (see
400: .B send
401: .I el
402: above)
403: is sent to the remote system.
404: The initial value for the kill character is taken to be
405: the terminal's
406: .B kill
407: character.
408: .TP
409: .I eof
410: .br
411: If
412: .I telnet
413: is operating in \*(lqline by line\*(rq mode, entering this character
414: as the first character on a line will cause this character to be
415: sent to the remote system.
416: The initial value of the eof character is taken to be the terminal's
417: .B eof
418: character.
419: .RE
420: .TP
421: .B toggle \fIarguments...\fP
422: .br
423: Toggle (between
424: TRUE
425: and
426: FALSE)
427: various flags that control how
428: .I telnet
429: responds to events.
430: More than one argument may be specified.
431: The state of these flags may be interrogated with the
432: .B display
433: command.
434: Valid arguments are:
435: .RS
436: .TP
437: .I localchars
438: .br
439: If this is
440: TRUE,
441: then the
442: .IR flush ,
443: .IR interrupt ,
444: .IR quit ,
445: .IR erase ,
446: and
447: .I kill
448: characters (see
449: .B set
450: above) are recognized locally, and transformed into (hopefully) appropriate
451: .B TELNET
452: control sequences
453: (respectively
454: .IR ao ,
455: .IR ip ,
456: .IR brk ,
457: .IR ec ,
458: and
459: .IR el ;
460: see
461: .B send
462: above).
463: The initial value for this toggle is TRUE in \*(lqline by line\*(rq mode,
464: and FALSE in \*(lqcharacter at a time\*(rq mode.
465: .TP
466: .I autoflush
467: .br
468: If
469: .I autoflush
470: and
471: .I localchars
472: are both
473: TRUE,
474: then when the
475: .IR ao ,
476: .IR intr ,
477: or
478: .I quit
479: characters are recognized (and transformed into
480: .B TELNET
481: sequences; see
482: .B set
483: above for details),
484: .I telnet
485: refuses to display any data on the user's terminal
486: until the remote system acknowledges (via a
487: .B TELNET
488: .I Timing Mark
489: option)
490: that it has processed those
491: .B TELNET
492: sequences.
493: The initial value for this toggle is TRUE if the terminal user had not
494: done an "stty noflsh", otherwise FALSE (see
495: .IR stty(1)).
496: .TP
497: .I autosynch
498: If
499: .I autosynch
500: and
501: .I localchars
502: are both
503: TRUE,
504: then when either the
505: .I intr
506: or
507: .I quit
508: characters is typed (see
509: .B set
510: above for descriptions of the
511: .I intr
512: and
513: .I quit
514: characters), the resulting
515: .B TELNET
516: sequence sent is followed by the
517: .B TELNET SYNCH
518: sequence.
519: This procedure
520: .B should
521: cause the remote system to begin throwing away all previously
522: typed input until both of the
523: .B TELNET
524: sequences have been read and acted upon.
525: The initial value of this toggle is FALSE.
526: .TP
527: .I crmod
528: .br
529: Toggle carriage return mode.
530: When this mode is enabled, most carriage return characters received from
531: the remote host will be mapped into a carriage return followed by
532: a line feed.
533: This mode does not affect those characters typed by the user, only
534: those received from the remote host.
535: This mode is not very useful unless the remote host
536: only sends carriage return, but never line feed.
537: The initial value for this toggle is FALSE.
538: .TP
539: .I debug
540: .br
541: Toggles socket level debugging (useful only to the
542: .IR super user ).
543: The initial value for this toggle is FALSE.
544: .TP
545: .I options
546: .br
547: Toggles the display of some internal
548: .I telnet
549: protocol processing (having to do with
550: .B TELNET
551: options).
552: The initial value for this toggle is FALSE.
553: .TP
554: .I netdata
555: .br
556: Toggles the display of all network data (in hexadecimal format).
557: The initial value for this toggle is FALSE.
558: .TP
559: .I ?
560: .br
561: Displays the legal
562: .B toggle
563: commands.
564: .RE
565: .SH BUGS
566: .PP
567: There is no adequate way for dealing with flow control.
568: .PP
569: On some remote systems, echo has to be turned off manually when in
570: \*(lqline by line\*(rq mode.
571: .PP
572: There is enough settable state to justify a
573: .RI . telnetrc
574: file.
575: .PP
576: No capability for a
577: .RI . telnetrc
578: file is provided.
579: .PP
580: In \*(lqline by line\*(rq mode, the terminal's
581: .I eof
582: character is only recognized (and sent to the remote system)
583: when it is the first character on a line.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.