Commit | Line | Data |
---|---|---|
7b089094 WJ |
1 | .\" Copyright (c) 1983, 1990 The Regents of the University of California. |
2 | .\" 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 6.16 (Berkeley) 7/27/91 | |
33 | .\" | |
34 | .Dd July 27, 1991 | |
35 | .Dt TELNET 1 | |
36 | .Os BSD 4.2 | |
37 | .Sh NAME | |
38 | .Nm telnet | |
39 | .Nd User interface to the | |
40 | .Tn TELNET | |
41 | protocol | |
42 | .Sh SYNOPSIS | |
43 | .Nm telnet | |
44 | .Op Fl d | |
45 | .Op Fl a | |
46 | .Op Fl n Ar tracefile | |
47 | .Op Fl e Ar escapechar | |
48 | .Oo | |
49 | .Op Fl l Ar user | |
50 | .Ar host | |
51 | .Op port | |
52 | .Oc | |
53 | .Sh DESCRIPTION | |
54 | The | |
55 | .Nm telnet | |
56 | command | |
57 | is used to communicate with another host using the | |
58 | .Tn TELNET | |
59 | protocol. | |
60 | If | |
61 | .Nm telnet | |
62 | is invoked without the | |
63 | .Ar host | |
64 | argument, it enters command mode, | |
65 | indicated by its prompt | |
66 | .Pq Nm telnet\&> . | |
67 | In this mode, it accepts and executes the commands listed below. | |
68 | If it is invoked with arguments, it performs an | |
69 | .Ic open | |
70 | command with those arguments. | |
71 | .Pp | |
72 | Options: | |
73 | .Bl -tag -width indent | |
74 | .It Fl d | |
75 | Sets the initial value of the | |
76 | .Ic debug | |
77 | toggle to | |
78 | .Dv TRUE | |
79 | .It Fl a | |
80 | Attempt automatic login. | |
81 | Currently, this sends the user name via the | |
82 | .Ev USER | |
83 | variable | |
84 | of the | |
85 | .Ev ENVIRON | |
86 | option if supported by the remote system. | |
87 | The name used is that of the current user as returned by | |
88 | .Xr getlogin 2 | |
89 | if it agrees with the current user ID, | |
90 | otherwise it is the name associated with the user ID. | |
91 | .It Fl n Ar tracefile | |
92 | Opens | |
93 | .Ar tracefile | |
94 | for recording trace information. | |
95 | See the | |
96 | .Ic set tracefile | |
97 | command below. | |
98 | .It Fl l Ar user | |
99 | When connecting to the remote system, if the remote system | |
100 | understands the | |
101 | .Ev ENVIRON | |
102 | option, then | |
103 | .Ar user | |
104 | will be sent to the remote system as the value for the variable USER. | |
105 | This option implies the | |
106 | .Fl a | |
107 | option. | |
108 | This option may also be used with the | |
109 | .Ic open | |
110 | command. | |
111 | .It Fl e Ar escape char | |
112 | Sets the initial | |
113 | .Nm | |
114 | .Nm telnet | |
115 | escape character to | |
116 | .Ar escape char. | |
117 | If | |
118 | .Ar escape char | |
119 | is ommitted, then | |
120 | there will be no escape character. | |
121 | .It Ar host | |
122 | Indicates the official name, an alias, or the Internet address | |
123 | of a remote host. | |
124 | .It Ar port | |
125 | Indicates a port number (address of an application). If a number is | |
126 | not specified, the default | |
127 | .Nm telnet | |
128 | port is used. | |
129 | .El | |
130 | .Pp | |
131 | Once a connection has been opened, | |
132 | .Nm telnet | |
133 | will attempt to enable the | |
134 | .Dv TELNET LINEMODE | |
135 | option. | |
136 | If this fails, then | |
137 | .Nm telnet | |
138 | will revert to one of two input modes: | |
139 | either \*(Lqcharacter at a time\*(Rq | |
140 | or \*(Lqold line by line\*(Rq | |
141 | depending on what the remote system supports. | |
142 | .Pp | |
143 | When | |
144 | .Dv LINEMODE | |
145 | is enabled, character processing is done on the | |
146 | local system, under the control of the remote system. When input | |
147 | editing or character echoing is to be disabled, the remote system | |
148 | will relay that information. The remote system will also relay | |
149 | changes to any special characters that happen on the remote | |
150 | system, so that they can take effect on the local system. | |
151 | .Pp | |
152 | In \*(Lqcharacter at a time\*(Rq mode, most | |
153 | text typed is immediately sent to the remote host for processing. | |
154 | .Pp | |
155 | In \*(Lqold line by line\*(Rq mode, all text is echoed locally, | |
156 | and (normally) only completed lines are sent to the remote host. | |
157 | The \*(Lqlocal echo character\*(Rq (initially \*(Lq^E\*(Rq) may be used | |
158 | to turn off and on the local echo | |
159 | (this would mostly be used to enter passwords | |
160 | without the password being echoed). | |
161 | .Pp | |
162 | If the | |
163 | .Dv LINEMODE | |
164 | option is enabled, or if the | |
165 | .Ic localchars | |
166 | toggle is | |
167 | .Dv TRUE | |
168 | (the default for \*(Lqold line by line\*(Lq; see below), | |
169 | the user's | |
170 | .Ic quit , | |
171 | .Ic intr , | |
172 | and | |
173 | .Ic flush | |
174 | characters are trapped locally, and sent as | |
175 | .Tn TELNET | |
176 | protocol sequences to the remote side. | |
177 | If | |
178 | .Dv LINEMODE | |
179 | has ever been enabled, then the user's | |
180 | .Ic susp | |
181 | and | |
182 | .Ic eof | |
183 | are also sent as | |
184 | .Tn TELNET | |
185 | protocol sequences, | |
186 | and | |
187 | .Ic quit | |
188 | is sent as a | |
189 | .Dv TELNET ABORT | |
190 | instead of | |
191 | .Dv BREAK | |
192 | There are options (see | |
193 | .Ic toggle | |
194 | .Ic autoflush | |
195 | and | |
196 | .Ic toggle | |
197 | .Ic autosynch | |
198 | below) | |
199 | which cause this action to flush subsequent output to the terminal | |
200 | (until the remote host acknowledges the | |
201 | .Tn TELNET | |
202 | sequence) and flush previous terminal input | |
203 | (in the case of | |
204 | .Ic quit | |
205 | and | |
206 | .Ic intr ) . | |
207 | .Pp | |
208 | While connected to a remote host, | |
209 | .Nm telnet | |
210 | command mode may be entered by typing the | |
211 | .Nm telnet | |
212 | \*(Lqescape character\*(Rq (initially \*(Lq^]\*(Rq). | |
213 | When in command mode, the normal terminal editing conventions are available. | |
214 | .Pp | |
215 | The following | |
216 | .Nm telnet | |
217 | commands are available. | |
218 | Only enough of each command to uniquely identify it need be typed | |
219 | (this is also true for arguments to the | |
220 | .Ic mode , | |
221 | .Ic set , | |
222 | .Ic toggle , | |
223 | .Ic unset , | |
224 | .Ic slc , | |
225 | .Ic environ , | |
226 | and | |
227 | .Ic display | |
228 | commands). | |
229 | .Pp | |
230 | .Bl -tag -width "mode type" | |
231 | .It Ic close | |
232 | Close a | |
233 | .Tn TELNET | |
234 | session and return to command mode. | |
235 | .It Ic display Ar argument ... | |
236 | Displays all, or some, of the | |
237 | .Ic set | |
238 | and | |
239 | .Ic toggle | |
240 | values (see below). | |
241 | .It Ic mode Ar type | |
242 | .Ar Type | |
243 | is one of several options, depending on the state of the | |
244 | .Tn TELNET | |
245 | session. | |
246 | The remote host is asked for permission to go into the requested mode. | |
247 | If the remote host is capable of entering that mode, the requested | |
248 | mode will be entered. | |
249 | .Bl -tag -width Ar | |
250 | .It Ic character | |
251 | Disable the | |
252 | .Dv TELNET LINEMODE | |
253 | option, or, if the remote side does not understand the | |
254 | .Dv LINEMODE | |
255 | option, then enter \*(Lqcharacter at a time\*(Lq mode. | |
256 | .It Ic line | |
257 | Enable the | |
258 | .Dv TELNET LINEMODE | |
259 | option, or, if the remote side does not understand the | |
260 | .Dv LINEMODE | |
261 | option, then attempt to enter \*(Lqold-line-by-line\*(Lq mode. | |
262 | .It Ic isig Pq Ic \-isig | |
263 | Attempt to enable (disable) the | |
264 | .Dv TRAPSIG | |
265 | mode of the | |
266 | .Dv LINEMODE | |
267 | option. | |
268 | This requires that the | |
269 | .Dv LINEMODE | |
270 | option be enabled. | |
271 | .It Ic edit Pq Ic \-edit | |
272 | Attempt to enable (disable) the | |
273 | .Dv EDIT | |
274 | mode of the | |
275 | .Dv LINEMODE | |
276 | option. | |
277 | This requires that the | |
278 | .Dv LINEMODE | |
279 | option be enabled. | |
280 | .It Ic softtabs Pq Ic \-softtabs | |
281 | Attempt to enable (disable) the | |
282 | .Dv SOFT_TAB | |
283 | mode of the | |
284 | .Dv LINEMODE | |
285 | option. | |
286 | This requires that the | |
287 | .Dv LINEMODE | |
288 | option be enabled. | |
289 | .It Ic litecho Pq Ic \-litecho | |
290 | Attempt to enable (disable) the | |
291 | .Dv LIT_ECHO | |
292 | mode of the | |
293 | .Dv LINEMODE | |
294 | option. | |
295 | This requires that the | |
296 | .Dv LINEMODE | |
297 | option be enabled. | |
298 | .It Ic \&? | |
299 | Prints out help information for the | |
300 | .Ic mode | |
301 | command. | |
302 | .El | |
303 | .It Xo | |
304 | .Ic open Ar host | |
305 | .Oo Op Fl l | |
306 | .Ar user | |
307 | .Oc Ns Oo Fl | |
308 | .Ar port Oc | |
309 | .Xc | |
310 | Open a connection to the named host. | |
311 | If no port number | |
312 | is specified, | |
313 | .Nm telnet | |
314 | will attempt to contact a | |
315 | .Tn TELNET | |
316 | server at the default port. | |
317 | The host specification may be either a host name (see | |
318 | .Xr hosts 5 ) | |
319 | or an Internet address specified in the \*(Lqdot notation\*(Rq (see | |
320 | .Xr inet 3 ) . | |
321 | The | |
322 | .Op Fl l | |
323 | option may be used to specify the user name | |
324 | to be passed to the remote system via the | |
325 | .Ev ENVIRON | |
326 | option. | |
327 | When connecting to a non-standard port, | |
328 | .Nm telnet | |
329 | omits any automatic initiation of | |
330 | .Tn TELNET | |
331 | options. When the port number is preceeded by a minus sign, | |
332 | the inital option negotiation is done. | |
333 | After establishing a connection, the file | |
334 | .Pa \&.telnetrc | |
335 | in the | |
336 | users home directory is opened. Lines begining with a # are | |
337 | comment lines. Blank lines are ignored. Lines that begin | |
338 | without whitespace are the start of a machine entry. The | |
339 | first thing on the line is the name of the machine that is | |
340 | being connected to. The rest of the line, and successive | |
341 | lines that begin with whitespace are assumed to be | |
342 | .Nm telnet | |
343 | commands and are processed as if they had been typed | |
344 | in manually to the | |
345 | .Nm telnet | |
346 | command prompt. | |
347 | .It Ic quit | |
348 | Close any open | |
349 | .Tn TELNET | |
350 | session and exit | |
351 | .Nm telnet . | |
352 | An end of file (in command mode) will also close a session and exit. | |
353 | .It Ic send Ar arguments | |
354 | Sends one or more special character sequences to the remote host. | |
355 | The following are the arguments which may be specified | |
356 | (more than one argument may be specified at a time): | |
357 | .Pp | |
358 | .Bl -tag -width escape | |
359 | .It Ic abort | |
360 | Sends the | |
361 | .Dv TELNET ABORT | |
362 | (Abort | |
363 | processes) | |
364 | sequence. | |
365 | .It Ic ao | |
366 | Sends the | |
367 | .Dv TELNET AO | |
368 | (Abort Output) sequence, which should cause the remote system to flush | |
369 | all output | |
370 | .Em from | |
371 | the remote system | |
372 | .Em to | |
373 | the user's terminal. | |
374 | .It Ic ayt | |
375 | Sends the | |
376 | .Dv TELNET AYT | |
377 | (Are You There) | |
378 | sequence, to which the remote system may or may not choose to respond. | |
379 | .It Ic brk | |
380 | Sends the | |
381 | .Dv TELNET BRK | |
382 | (Break) sequence, which may have significance to the remote | |
383 | system. | |
384 | .It Ic ec | |
385 | Sends the | |
386 | .Dv TELNET EC | |
387 | (Erase Character) | |
388 | sequence, which should cause the remote system to erase the last character | |
389 | entered. | |
390 | .It Ic el | |
391 | Sends the | |
392 | .Dv TELNET EL | |
393 | (Erase Line) | |
394 | sequence, which should cause the remote system to erase the line currently | |
395 | being entered. | |
396 | .It Ic eof | |
397 | Sends the | |
398 | .Dv TELNET EOF | |
399 | (End Of File) | |
400 | sequence. | |
401 | .It Ic eor | |
402 | Sends the | |
403 | .Dv TELNET EOR | |
404 | (End of Record) | |
405 | sequence. | |
406 | .It Ic escape | |
407 | Sends the current | |
408 | .Nm telnet | |
409 | escape character (initially \*(Lq^\*(Rq). | |
410 | .It Ic ga | |
411 | Sends the | |
412 | .Dv TELNET GA | |
413 | (Go Ahead) | |
414 | sequence, which likely has no significance to the remote system. | |
415 | .It Ic getstatus | |
416 | If the remote side supports the | |
417 | .Dv TELNET STATUS | |
418 | command, | |
419 | .Ic getstatus | |
420 | will send the subnegotiation to request that the server send | |
421 | its current option status. | |
422 | .It Ic ip | |
423 | Sends the | |
424 | .Dv TELNET IP | |
425 | (Interrupt Process) sequence, which should cause the remote | |
426 | system to abort the currently running process. | |
427 | .It Ic nop | |
428 | Sends the | |
429 | .Dv TELNET NOP | |
430 | (No OPeration) | |
431 | sequence. | |
432 | .It Ic susp | |
433 | Sends the | |
434 | .Dv TELNET SUSP | |
435 | (SUSPend process) | |
436 | sequence. | |
437 | .It Ic synch | |
438 | Sends the | |
439 | .Dv TELNET SYNCH | |
440 | sequence. | |
441 | This sequence causes the remote system to discard all previously typed | |
442 | (but not yet read) input. | |
443 | This sequence is sent as | |
444 | .Tn TCP | |
445 | urgent | |
446 | data (and may not work if the remote system is a | |
447 | .Bx 4.2 | |
448 | system -- if | |
449 | it doesn't work, a lower case \*(Lqr\*(Rq may be echoed on the terminal). | |
450 | .It Ic \&? | |
451 | Prints out help information for the | |
452 | .Ic send | |
453 | command. | |
454 | .El | |
455 | .It Ic set Ar argument value | |
456 | .It Ic unset Ar argument value | |
457 | The | |
458 | .Ic set | |
459 | command will set any one of a number of | |
460 | .Nm telnet | |
461 | variables to a specific value or to | |
462 | .Dv TRUE . | |
463 | The special value | |
464 | .Ic off | |
465 | turns off the function associated with | |
466 | the variable, this is equivalent to using the | |
467 | .Ic unset | |
468 | command. | |
469 | The | |
470 | .Ic unset | |
471 | command will disable or set to | |
472 | .Dv FALSE | |
473 | any of the specified functions. | |
474 | The values of variables may be interrogated with the | |
475 | .Ic display | |
476 | command. | |
477 | The variables which may be set or unset, but not toggled, are | |
478 | listed here. In addition, any of the variables for the | |
479 | .Ic toggle | |
480 | command may be explicitly set or unset using | |
481 | the | |
482 | .Ic set | |
483 | and | |
484 | .Ic unset | |
485 | commands. | |
486 | .Bl -tag -width escape | |
487 | .It Ic echo | |
488 | This is the value (initially \*(Lq^E\*(Rq) which, when in | |
489 | \*(Lqline by line\*(Rq mode, toggles between doing local echoing | |
490 | of entered characters (for normal processing), and suppressing | |
491 | echoing of entered characters (for entering, say, a password). | |
492 | .It Ic eof | |
493 | If | |
494 | .Nm telnet | |
495 | is operating in | |
496 | .Dv LINEMODE | |
497 | or \*(Lqold line by line\*(Rq mode, entering this character | |
498 | as the first character on a line will cause this character to be | |
499 | sent to the remote system. | |
500 | The initial value of the eof character is taken to be the terminal's | |
501 | .Ic eof | |
502 | character. | |
503 | .It Ic erase | |
504 | If | |
505 | .Nm telnet | |
506 | is in | |
507 | .Ic localchars | |
508 | mode (see | |
509 | .Ic toggle | |
510 | .Ic localchars | |
511 | below), | |
512 | .Sy and | |
513 | if | |
514 | .Nm telnet | |
515 | is operating in \*(Lqcharacter at a time\*(Rq mode, then when this | |
516 | character is typed, a | |
517 | .Dv TELNET EC | |
518 | sequence (see | |
519 | .Ic send | |
520 | .Ic ec | |
521 | above) | |
522 | is sent to the remote system. | |
523 | The initial value for the erase character is taken to be | |
524 | the terminal's | |
525 | .Ic erase | |
526 | character. | |
527 | .It Ic escape | |
528 | This is the | |
529 | .Nm telnet | |
530 | escape character (initially \*(Lq^[\*(Rq) which causes entry | |
531 | into | |
532 | .Nm telnet | |
533 | command mode (when connected to a remote system). | |
534 | .It Ic flushoutput | |
535 | If | |
536 | .Nm telnet | |
537 | is in | |
538 | .Ic localchars | |
539 | mode (see | |
540 | .Ic toggle | |
541 | .Ic localchars | |
542 | below) | |
543 | and the | |
544 | .Ic flushoutput | |
545 | character is typed, a | |
546 | .Dv TELNET AO | |
547 | sequence (see | |
548 | .Ic send | |
549 | .Ic ao | |
550 | above) | |
551 | is sent to the remote host. | |
552 | The initial value for the flush character is taken to be | |
553 | the terminal's | |
554 | .Ic flush | |
555 | character. | |
556 | .It Ic interrupt | |
557 | If | |
558 | .Nm telnet | |
559 | is in | |
560 | .Ic localchars | |
561 | mode (see | |
562 | .Ic toggle | |
563 | .Ic localchars | |
564 | below) | |
565 | and the | |
566 | .Ic interrupt | |
567 | character is typed, a | |
568 | .Dv TELNET IP | |
569 | sequence (see | |
570 | .Ic send | |
571 | .Ic ip | |
572 | above) | |
573 | is sent to the remote host. | |
574 | The initial value for the interrupt character is taken to be | |
575 | the terminal's | |
576 | .Ic intr | |
577 | character. | |
578 | .It Ic kill | |
579 | If | |
580 | .Nm telnet | |
581 | is in | |
582 | .Ic localchars | |
583 | mode (see | |
584 | .Ic toggle | |
585 | .Ic localchars | |
586 | below), | |
587 | .Ic and | |
588 | if | |
589 | .Nm telnet | |
590 | is operating in \*(Lqcharacter at a time\*(Rq mode, then when this | |
591 | character is typed, a | |
592 | .Dv TELNET EL | |
593 | sequence (see | |
594 | .Ic send | |
595 | .Ic el | |
596 | above) | |
597 | is sent to the remote system. | |
598 | The initial value for the kill character is taken to be | |
599 | the terminal's | |
600 | .Ic kill | |
601 | character. | |
602 | .It Ic lnext | |
603 | If | |
604 | .Nm telnet | |
605 | is operating in | |
606 | .Dv LINEMODE | |
607 | or \*(Lqold line by line\*(Lq mode, then this character is taken to | |
608 | be the terminal's | |
609 | .Ic lnext | |
610 | character. | |
611 | The initial value for the lnext character is taken to be | |
612 | the terminal's | |
613 | .Ic lnext | |
614 | character. | |
615 | .It Ic quit | |
616 | If | |
617 | .Nm telnet | |
618 | is in | |
619 | .Ic localchars | |
620 | mode (see | |
621 | .Ic toggle | |
622 | .Ic localchars | |
623 | below) | |
624 | and the | |
625 | .Ic quit | |
626 | character is typed, a | |
627 | .Dv TELNET BRK | |
628 | sequence (see | |
629 | .Ic send | |
630 | .Ic brk | |
631 | above) | |
632 | is sent to the remote host. | |
633 | The initial value for the quit character is taken to be | |
634 | the terminal's | |
635 | .Ic quit | |
636 | character. | |
637 | .It Ic reprint | |
638 | If | |
639 | .Nm telnet | |
640 | is operating in | |
641 | .Dv LINEMODE | |
642 | or \*(Lqold line by line\*(Lq mode, then this character is taken to | |
643 | be the terminal's | |
644 | .Ic reprint | |
645 | character. | |
646 | The initial value for the reprint character is taken to be | |
647 | the terminal's | |
648 | .Ic reprint | |
649 | character. | |
650 | .It Ic start | |
651 | If the | |
652 | .Dv TELNET TOGGLE-FLOW-CONTROL | |
653 | option has been enabled, | |
654 | then this character is taken to | |
655 | be the terminal's | |
656 | .Ic start | |
657 | character. | |
658 | The initial value for the kill character is taken to be | |
659 | the terminal's | |
660 | .Ic start | |
661 | character. | |
662 | .It Ic stop | |
663 | If the | |
664 | .Dv TELNET TOGGLE-FLOW-CONTROL | |
665 | option has been enabled, | |
666 | then this character is taken to | |
667 | be the terminal's | |
668 | .Ic stop | |
669 | character. | |
670 | The initial value for the kill character is taken to be | |
671 | the terminal's | |
672 | .Ic stop | |
673 | character. | |
674 | .It Ic susp | |
675 | If | |
676 | .Nm telnet | |
677 | is in | |
678 | .Ic localchars | |
679 | mode, or | |
680 | .Dv LINEMODE | |
681 | is enabled, and the | |
682 | .Ic suspend | |
683 | character is typed, a | |
684 | .Dv TELNET SUSP | |
685 | sequence (see | |
686 | .Ic send | |
687 | .Ic susp | |
688 | above) | |
689 | is sent to the remote host. | |
690 | The initial value for the suspend character is taken to be | |
691 | the terminal's | |
692 | .Ic suspend | |
693 | character. | |
694 | .It Ic tracefile | |
695 | Thi is the file to which the output, caused by | |
696 | .Ic netdata | |
697 | or | |
698 | .Ic option | |
699 | tracing being | |
700 | .Dv TRUE , | |
701 | will be written. If it is set to | |
702 | .Dq Fl , | |
703 | then tracing information will be written to standard output (the default). | |
704 | .It Ic worderase | |
705 | If | |
706 | .Nm telnet | |
707 | is operating in | |
708 | .Dv LINEMODE | |
709 | or \*(Lqold line by line\*(Lq mode, then this character is taken to | |
710 | be the terminal's | |
711 | .Ic worderase | |
712 | character. | |
713 | The initial value for the worderase character is taken to be | |
714 | the terminal's | |
715 | .Ic worderase | |
716 | character. | |
717 | .It Ic \&? | |
718 | Displays the legal | |
719 | .Ic set | |
720 | .Pq Ic unset | |
721 | commands. | |
722 | .El | |
723 | .It Ic slc Ar state | |
724 | The | |
725 | .Ic slc | |
726 | command (Set Local Characters) is used to set | |
727 | or change the state of the the special | |
728 | characters when the | |
729 | .Dv TELNET LINEMODE | |
730 | option has | |
731 | been enabled. Special characters are characters that get | |
732 | mapped to | |
733 | .Tn TELNET | |
734 | commands sequences (like | |
735 | .Ic ip | |
736 | or | |
737 | .Ic quit ) | |
738 | or line editing characters (like | |
739 | .Ic erase | |
740 | and | |
741 | .Ic kill ) . | |
742 | By default, the local special characters are exported. | |
743 | .Bl -tag -width Fl | |
744 | .It Ic export | |
745 | Switch to the local defaults for the special characters. The | |
746 | local default characters are those of the local terminal at | |
747 | the time when | |
748 | .Nm telnet | |
749 | was started. | |
750 | .It Ic import | |
751 | Switch to the remote defaults for the special characters. | |
752 | The remote default characters are those of the remote system | |
753 | at the time when the | |
754 | .Tn TELNET | |
755 | connection was established. | |
756 | .It Ic check | |
757 | Verify the current settings for the current special characters. | |
758 | The remote side is requested to send all the current special | |
759 | character settings, and if there are any discrepencies with | |
760 | the local side, the local side will switch to the remote value. | |
761 | .It Ic \&? | |
762 | Prints out help information for the | |
763 | .Ic slc | |
764 | command. | |
765 | .El | |
766 | .It Ic environ Ar arguments... | |
767 | The | |
768 | .Ic environ | |
769 | command is used to manipulate the | |
770 | the variables that my be sent through the | |
771 | .Dv TELNET ENVIRON | |
772 | option. | |
773 | The initial set of variables is taken from the users | |
774 | environment, with only the | |
775 | .Ev DISPLAY | |
776 | and | |
777 | .Ev PRINTER | |
778 | variables being exported by default. | |
779 | The | |
780 | .Ev USER | |
781 | variable is also exported if the | |
782 | .Fl a | |
783 | or | |
784 | .Fl l | |
785 | options are used. | |
786 | .br | |
787 | Valid arguments for the | |
788 | .Ic environ | |
789 | command are: | |
790 | .Bl -tag -width Fl | |
791 | .It Ic define Ar variable value | |
792 | Define the variable | |
793 | .Ar variable | |
794 | to have a value of | |
795 | .Ar value. | |
796 | Any variables defined by this command are automatically exported. | |
797 | The | |
798 | .Ar value | |
799 | may be enclosed in single or double quotes so | |
800 | that tabs and spaces may be included. | |
801 | .It Ic undefine Ar variable | |
802 | Remove | |
803 | .Ar variable | |
804 | from the list of environment variables. | |
805 | .It Ic export Ar variable | |
806 | Mark the variable | |
807 | .Ar variable | |
808 | to be exported to the remote side. | |
809 | .It Ic unexport Ar variable | |
810 | Mark the variable | |
811 | .Ar variable | |
812 | to not be exported unless | |
813 | explicitly asked for by the remote side. | |
814 | .It Ic list | |
815 | List the current set of environment variables. | |
816 | Those marked with a | |
817 | .Cm * | |
818 | will be sent automatically, | |
819 | other variables will only be sent if explicitly requested. | |
820 | .It Ic \&? | |
821 | Prints out help information for the | |
822 | .Ic environ | |
823 | command. | |
824 | .El | |
825 | .It Ic toggle Ar arguments ... | |
826 | Toggle (between | |
827 | .Dv TRUE | |
828 | and | |
829 | .Dv FALSE ) | |
830 | various flags that control how | |
831 | .Nm telnet | |
832 | responds to events. | |
833 | These flags may be set explicitly to | |
834 | .Dv TRUE | |
835 | or | |
836 | .Dv FALSE | |
837 | using the | |
838 | .Ic set | |
839 | and | |
840 | .Ic unset | |
841 | commands listed above. | |
842 | More than one argument may be specified. | |
843 | The state of these flags may be interrogated with the | |
844 | .Ic display | |
845 | command. | |
846 | Valid arguments are: | |
847 | .Bl -tag -width Ar | |
848 | .It Ic autoflush | |
849 | If | |
850 | .Ic autoflush | |
851 | and | |
852 | .Ic localchars | |
853 | are both | |
854 | .Dv TRUE , | |
855 | then when the | |
856 | .Ic ao , | |
857 | or | |
858 | .Ic quit | |
859 | characters are recognized (and transformed into | |
860 | .Tn TELNET | |
861 | sequences; see | |
862 | .Ic set | |
863 | above for details), | |
864 | .Nm telnet | |
865 | refuses to display any data on the user's terminal | |
866 | until the remote system acknowledges (via a | |
867 | .Dv TELNET TIMING MARK | |
868 | option) | |
869 | that it has processed those | |
870 | .Tn TELNET | |
871 | sequences. | |
872 | The initial value for this toggle is | |
873 | .Dv TRUE | |
874 | if the terminal user had not | |
875 | done an "stty noflsh", otherwise | |
876 | .Dv FALSE | |
877 | (see | |
878 | .Xr stty 1 ) . | |
879 | .It Ic autosynch | |
880 | If | |
881 | .Ic autosynch | |
882 | and | |
883 | .Ic localchars | |
884 | are both | |
885 | .Dv TRUE , | |
886 | then when either the | |
887 | .Ic intr | |
888 | or | |
889 | .Ic quit | |
890 | characters is typed (see | |
891 | .Ic set | |
892 | above for descriptions of the | |
893 | .Ic intr | |
894 | and | |
895 | .Ic quit | |
896 | characters), the resulting | |
897 | .Tn TELNET | |
898 | sequence sent is followed by the | |
899 | .Dv TELNET SYNCH | |
900 | sequence. | |
901 | This procedure | |
902 | .Ic should | |
903 | cause the remote system to begin throwing away all previously | |
904 | typed input until both of the | |
905 | .Tn TELNET | |
906 | sequences have been read and acted upon. | |
907 | The initial value of this toggle is | |
908 | .Dv FALSE . | |
909 | .It Ic binary | |
910 | Enable or disable the | |
911 | .Dv TELNET BINARY | |
912 | option on both input and output. | |
913 | .It Ic inbinary | |
914 | Enable or disable the | |
915 | .Dv TELNET BINARY | |
916 | option on input. | |
917 | .It Ic outbinary | |
918 | Enable or disable the | |
919 | .Dv TELNET BINARY | |
920 | option on output. | |
921 | .It Ic crlf | |
922 | If this is | |
923 | .Dv TRUE , | |
924 | then carriage returns will be sent as | |
925 | .Li <CR><LF> . | |
926 | If this is | |
927 | .Dv FALSE , | |
928 | then carriage returns will be send as | |
929 | .Li <CR><NUL> . | |
930 | The initial value for this toggle is | |
931 | .Dv FALSE . | |
932 | .It Ic crmod | |
933 | Toggle carriage return mode. | |
934 | When this mode is enabled, most carriage return characters received from | |
935 | the remote host will be mapped into a carriage return followed by | |
936 | a line feed. | |
937 | This mode does not affect those characters typed by the user, only | |
938 | those received from the remote host. | |
939 | This mode is not very useful unless the remote host | |
940 | only sends carriage return, but never line feed. | |
941 | The initial value for this toggle is | |
942 | .Dv FALSE . | |
943 | .It Ic debug | |
944 | Toggles socket level debugging (useful only to the | |
945 | .Ic super user ) . | |
946 | The initial value for this toggle is | |
947 | .Dv FALSE . | |
948 | .It Ic localchars | |
949 | If this is | |
950 | .Dv TRUE , | |
951 | then the | |
952 | .Ic flush , | |
953 | .Ic interrupt , | |
954 | .Ic quit , | |
955 | .Ic erase , | |
956 | and | |
957 | .Ic kill | |
958 | characters (see | |
959 | .Ic set | |
960 | above) are recognized locally, and transformed into (hopefully) appropriate | |
961 | .Tn TELNET | |
962 | control sequences | |
963 | (respectively | |
964 | .Ic ao , | |
965 | .Ic ip , | |
966 | .Ic brk , | |
967 | .Ic ec , | |
968 | and | |
969 | .Ic el ; | |
970 | see | |
971 | .Ic send | |
972 | above). | |
973 | The initial value for this toggle is | |
974 | .Dv TRUE | |
975 | in \*(Lqold line by line\*(Rq mode, | |
976 | and | |
977 | .Dv FALSE | |
978 | in \*(Lqcharacter at a time\*(Rq mode. | |
979 | When the | |
980 | .Dv LINEMODE | |
981 | option is enabled, the value of | |
982 | .Ic localchars | |
983 | is ignored, and assumed to always be | |
984 | .Dv TRUE . | |
985 | If | |
986 | .Dv LINEMODE | |
987 | has ever been enabled, then | |
988 | .Ic quit | |
989 | is sent as | |
990 | .Ic abort , | |
991 | and | |
992 | .Ic eof and | |
993 | .B suspend | |
994 | are sent as | |
995 | .Ic eof and | |
996 | .Ic susp , | |
997 | see | |
998 | .Ic send | |
999 | above). | |
1000 | .It Ic netdata | |
1001 | Toggles the display of all network data (in hexadecimal format). | |
1002 | The initial value for this toggle is | |
1003 | .Dv FALSE . | |
1004 | .It Ic options | |
1005 | Toggles the display of some internal | |
1006 | .Nm telnet | |
1007 | protocol processing (having to do with | |
1008 | .Tn TELNET | |
1009 | options). | |
1010 | The initial value for this toggle is | |
1011 | .Dv FALSE . | |
1012 | .It Ic prettydump | |
1013 | When the | |
1014 | .Ic netdata | |
1015 | toggle is enabled, if | |
1016 | .Ic prettydump | |
1017 | is enabled the output from the | |
1018 | .Ic netdata | |
1019 | command will be formated in a more user readable format. | |
1020 | Spaces are put between each character in the output, and the | |
1021 | begining of any | |
1022 | .Tn TELNET | |
1023 | escape sequence is preceeded by a '*' to aid in locating them. | |
1024 | .It Ic \&? | |
1025 | Displays the legal | |
1026 | .Ic toggle | |
1027 | commands. | |
1028 | .El | |
1029 | .It Ic z | |
1030 | Suspend | |
1031 | .Nm telnet . | |
1032 | This command only works when the user is using the | |
1033 | .Xr csh 1 . | |
1034 | .It Ic \&! Op Ar command | |
1035 | Execute a single command in a subshell on the local | |
1036 | system. If | |
1037 | .Ic command | |
1038 | is ommitted, then an interactive | |
1039 | subshell is invoked. | |
1040 | .It Ic status | |
1041 | Show the current status of | |
1042 | .Nm telnet . | |
1043 | This includes the peer one is connected to, as well | |
1044 | as the current mode. | |
1045 | .It Ic \&? Op Ar command | |
1046 | Get help. With no arguments, | |
1047 | .Nm telnet | |
1048 | prints a help summary. | |
1049 | If a command is specified, | |
1050 | .Nm telnet | |
1051 | will print the help information for just that command. | |
1052 | .El | |
1053 | .Sh ENVIRONMENT | |
1054 | .Nm Telnet | |
1055 | uses at least the | |
1056 | .Ev HOME , | |
1057 | .Ev SHELL , | |
1058 | .Ev DISPLAY , | |
1059 | and | |
1060 | .Ev TERM | |
1061 | environent variables. | |
1062 | Other envirnoment variables may be propogated | |
1063 | to the other side via the | |
1064 | .Dv TELNET ENVIRON | |
1065 | option. | |
1066 | .Sh FILES | |
1067 | .Bl -tag -width ~/.telnetrc -compact | |
1068 | .It Pa ~/.telnetrc | |
1069 | user customized telnet startup values | |
1070 | .El | |
1071 | .Sh HISTORY | |
1072 | The | |
1073 | .Nm Telnet | |
1074 | command appeared in | |
1075 | .Bx 4.2 . | |
1076 | .Sh NOTES | |
1077 | .Pp | |
1078 | On some remote systems, echo has to be turned off manually when in | |
1079 | \*(Lqold line by line\*(Rq mode. | |
1080 | .Pp | |
1081 | In \*(Lqold line by line\*(Rq mode or | |
1082 | .Dv LINEMODE | |
1083 | the terminal's | |
1084 | .Ic eof | |
1085 | character is only recognized (and sent to the remote system) | |
1086 | when it is the first character on a line. |