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