1*62313Sbostic.\" Copyright (c) 1983, 1990, 1993 2*62313Sbostic.\" The Regents of the University of California. All rights reserved. 319759Smckusick.\" 450604Scael.\" %sccs.include.redist.roff% 519759Smckusick.\" 6*62313Sbostic.\" @(#)telnet.1 8.1 (Berkeley) 06/06/93 735656Sbostic.\" 843085Scael.Dd 943085Scael.Dt TELNET 1 1043085Scael.Os BSD 4.2 1143085Scael.Sh NAME 1243085Scael.Nm telnet 1343085Scael.Nd user interface to the 1450604Scael.Tn TELNET 1543085Scaelprotocol 1643085Scael.Sh SYNOPSIS 1743085Scael.Nm telnet 1843085Scael.Op Fl d 1945010Skarels.Op Fl a 2043085Scael.Op Fl n Ar tracefile 2145010Skarels.Op Fl e Ar escapechar 2250604Scael.Oo 2345010Skarels.Op Fl l Ar user 2445013Scael.Ar host 2545013Scael.Op port 2650604Scael.Oc 2743085Scael.Sh DESCRIPTION 2838711SbormanThe 2943085Scael.Nm telnet 3038711Sbormancommand 3143085Scaelis used to communicate with another host using the 3250604Scael.Tn TELNET 3343085Scaelprotocol. 3443085ScaelIf 3543085Scael.Nm telnet 3638711Sbormanis invoked without the 3743085Scael.Ar host 3838711Sbormanargument, it enters command mode, 3943085Scaelindicated by its prompt 4043085Scael.Pq Nm telnet\&> . 4119759SmckusickIn this mode, it accepts and executes the commands listed below. 4219759SmckusickIf it is invoked with arguments, it performs an 4343085Scael.Ic open 4443085Scaelcommand with those arguments. 4543085Scael.Pp 4643085ScaelOptions: 4750604Scael.Bl -tag -width indent 4850604Scael.It Fl d 4943085ScaelSets the initial value of the 5043085Scael.Ic debug 5143085Scaeltoggle to 5250604Scael.Dv TRUE 5350604Scael.It Fl a 5445010SkarelsAttempt automatic login. 5550604ScaelCurrently, this sends the user name via the 5650604Scael.Ev USER 5750604Scaelvariable 5850604Scaelof the 5950604Scael.Ev ENVIRON 6050604Scaeloption if supported by the remote system. 6145010SkarelsThe name used is that of the current user as returned by 6245010Skarels.Xr getlogin 2 6345010Skarelsif it agrees with the current user ID, 6445010Skarelsotherwise it is the name associated with the user ID. 6550604Scael.It Fl n Ar tracefile 6643085ScaelOpens 6743085Scael.Ar tracefile 6843085Scaelfor recording trace information. 6943085ScaelSee the 7043085Scael.Ic set tracefile 7143085Scaelcommand below. 7250604Scael.It Fl l Ar user 7345010SkarelsWhen connecting to the remote system, if the remote system 7450604Scaelunderstands the 7550604Scael.Ev ENVIRON 7650604Scaeloption, then 7745010Skarels.Ar user 7845010Skarelswill be sent to the remote system as the value for the variable USER. 7945010SkarelsThis option implies the 8045010Skarels.Fl a 8145010Skarelsoption. 8245010SkarelsThis option may also be used with the 8345010Skarels.Ic open 8445010Skarelscommand. 8550604Scael.It Fl e Ar escape char 8645010SkarelsSets the initial 8745010Skarels.Nm 8850604Scael.Nm telnet 8945010Skarelsescape character to 9045010Skarels.Ar escape char. 9145010SkarelsIf 9245010Skarels.Ar escape char 9345010Skarelsis ommitted, then 9445010Skarelsthere will be no escape character. 9550604Scael.It Ar host 9643085ScaelIndicates the official name, an alias, or the Internet address 9743085Scaelof a remote host. 9850604Scael.It Ar port 9943085ScaelIndicates a port number (address of an application). If a number is 10043085Scaelnot specified, the default 10143085Scael.Nm telnet 10243085Scaelport is used. 10350604Scael.El 10443085Scael.Pp 10519759SmckusickOnce a connection has been opened, 10643085Scael.Nm telnet 10738711Sbormanwill attempt to enable the 10850604Scael.Dv TELNET LINEMODE 10938711Sbormanoption. 11038711SbormanIf this fails, then 11143085Scael.Nm telnet 11238711Sbormanwill revert to one of two input modes: 11343085Scaeleither \*(Lqcharacter at a time\*(Rq 11443085Scaelor \*(Lqold line by line\*(Rq 11527692Sminshalldepending on what the remote system supports. 11643085Scael.Pp 11743085ScaelWhen 11850604Scael.Dv LINEMODE 11943085Scaelis enabled, character processing is done on the 12038711Sbormanlocal system, under the control of the remote system. When input 12138711Sbormanediting or character echoing is to be disabled, the remote system 12238711Sbormanwill relay that information. The remote system will also relay 12338711Sbormanchanges to any special characters that happen on the remote 12438711Sbormansystem, so that they can take effect on the local system. 12543085Scael.Pp 12643085ScaelIn \*(Lqcharacter at a time\*(Rq mode, most 12727692Sminshalltext typed is immediately sent to the remote host for processing. 12843085Scael.Pp 12943085ScaelIn \*(Lqold line by line\*(Rq mode, all text is echoed locally, 13027692Sminshalland (normally) only completed lines are sent to the remote host. 13143085ScaelThe \*(Lqlocal echo character\*(Rq (initially \*(Lq^E\*(Rq) may be used 13227692Sminshallto turn off and on the local echo 13327692Sminshall(this would mostly be used to enter passwords 13427692Sminshallwithout the password being echoed). 13543085Scael.Pp 13643085ScaelIf the 13750604Scael.Dv LINEMODE 13843085Scaeloption is enabled, or if the 13943085Scael.Ic localchars 14050604Scaeltoggle is 14150604Scael.Dv TRUE 14250604Scael(the default for \*(Lqold line by line\*(Lq; see below), 14327692Sminshallthe user's 14443085Scael.Ic quit , 14543085Scael.Ic intr , 14627692Sminshalland 14743085Scael.Ic flush 14827692Sminshallcharacters are trapped locally, and sent as 14950604Scael.Tn TELNET 15027692Sminshallprotocol sequences to the remote side. 15143085ScaelIf 15250604Scael.Dv LINEMODE 15343085Scaelhas ever been enabled, then the user's 15443085Scael.Ic susp 15538711Sbormanand 15643085Scael.Ic eof 15738711Sbormanare also sent as 15850604Scael.Tn TELNET 15938711Sbormanprotocol sequences, 16038711Sbormanand 16143085Scael.Ic quit 16243085Scaelis sent as a 16350604Scael.Dv TELNET ABORT 16443085Scaelinstead of 16550604Scael.Dv BREAK 16627692SminshallThere are options (see 16743085Scael.Ic toggle 16843085Scael.Ic autoflush 16927692Sminshalland 17043085Scael.Ic toggle 17143085Scael.Ic autosynch 17227692Sminshallbelow) 17327692Sminshallwhich cause this action to flush subsequent output to the terminal 17427692Sminshall(until the remote host acknowledges the 17550604Scael.Tn TELNET 17627692Sminshallsequence) and flush previous terminal input 17727692Sminshall(in the case of 17843085Scael.Ic quit 17927692Sminshalland 18043085Scael.Ic intr ) . 18143085Scael.Pp 18227692SminshallWhile connected to a remote host, 18343085Scael.Nm telnet 18427692Sminshallcommand mode may be entered by typing the 18543085Scael.Nm telnet 18649965Ssellgren\*(Lqescape character\*(Rq (initially \*(Lq^]\*(Rq). 18719759SmckusickWhen in command mode, the normal terminal editing conventions are available. 18843085Scael.Pp 18949965SsellgrenThe following 19049965Ssellgren.Nm telnet 19143085Scaelcommands are available. 19227692SminshallOnly enough of each command to uniquely identify it need be typed 19327692Sminshall(this is also true for arguments to the 19443085Scael.Ic mode , 19543085Scael.Ic set , 19643085Scael.Ic toggle , 19743085Scael.Ic unset , 19843085Scael.Ic slc , 19945010Skarels.Ic environ , 20027692Sminshalland 20143085Scael.Ic display 20227692Sminshallcommands). 20343085Scael.Pp 20450604Scael.Bl -tag -width "mode type" 20550604Scael.It Ic close 20627692SminshallClose a 20750604Scael.Tn TELNET 20827692Sminshallsession and return to command mode. 20950604Scael.It Ic display Ar argument ... 21038711SbormanDisplays all, or some, of the 21143085Scael.Ic set 21238711Sbormanand 21343085Scael.Ic toggle 21438711Sbormanvalues (see below). 21550604Scael.It Ic mode Ar type 21643085Scael.Ar Type 21738711Sbormanis one of several options, depending on the state of the 21850604Scael.Tn TELNET 21938711Sbormansession. 22027692SminshallThe remote host is asked for permission to go into the requested mode. 22127692SminshallIf the remote host is capable of entering that mode, the requested 22227692Sminshallmode will be entered. 22350604Scael.Bl -tag -width Ar 22450604Scael.It Ic character 22538711SbormanDisable the 22650604Scael.Dv TELNET LINEMODE 22738711Sbormanoption, or, if the remote side does not understand the 22850604Scael.Dv LINEMODE 22943085Scaeloption, then enter \*(Lqcharacter at a time\*(Lq mode. 23050604Scael.It Ic line 23138711SbormanEnable the 23250604Scael.Dv TELNET LINEMODE 23338711Sbormanoption, or, if the remote side does not understand the 23450604Scael.Dv LINEMODE 23543085Scaeloption, then attempt to enter \*(Lqold-line-by-line\*(Lq mode. 23650604Scael.It Ic isig Pq Ic \-isig 23743085ScaelAttempt to enable (disable) the 23850604Scael.Dv TRAPSIG 23943085Scaelmode of the 24050604Scael.Dv LINEMODE 24143085Scaeloption. 24243085ScaelThis requires that the 24350604Scael.Dv LINEMODE 24443085Scaeloption be enabled. 24550604Scael.It Ic edit Pq Ic \-edit 24643085ScaelAttempt to enable (disable) the 24750604Scael.Dv EDIT 24843085Scaelmode of the 24950604Scael.Dv LINEMODE 25043085Scaeloption. 25143085ScaelThis requires that the 25250604Scael.Dv LINEMODE 25343085Scaeloption be enabled. 25450604Scael.It Ic softtabs Pq Ic \-softtabs 25545010SkarelsAttempt to enable (disable) the 25650604Scael.Dv SOFT_TAB 25745010Skarelsmode of the 25850604Scael.Dv LINEMODE 25945010Skarelsoption. 26045010SkarelsThis requires that the 26150604Scael.Dv LINEMODE 26245010Skarelsoption be enabled. 26350604Scael.It Ic litecho Pq Ic \-litecho 26445010SkarelsAttempt to enable (disable) the 26550604Scael.Dv LIT_ECHO 26645010Skarelsmode of the 26750604Scael.Dv LINEMODE 26845010Skarelsoption. 26945010SkarelsThis requires that the 27050604Scael.Dv LINEMODE 27145010Skarelsoption be enabled. 27250604Scael.It Ic \&? 27338711SbormanPrints out help information for the 27443085Scael.Ic mode 27538711Sbormancommand. 27650604Scael.El 27750604Scael.It Xo 27850604Scael.Ic open Ar host 27950604Scael.Oo Op Fl l 28045010Skarels.Ar user 28150604Scael.Oc Ns Oo Fl 28250604Scael.Ar port Oc 28350604Scael.Xc 28438711SbormanOpen a connection to the named host. 28538711SbormanIf no port number 28643085Scaelis specified, 28743085Scael.Nm telnet 28838711Sbormanwill attempt to contact a 28950604Scael.Tn TELNET 29038711Sbormanserver at the default port. 29143085ScaelThe host specification may be either a host name (see 29243085Scael.Xr hosts 5 ) 29343085Scaelor an Internet address specified in the \*(Lqdot notation\*(Rq (see 29443085Scael.Xr inet 3 ) . 29545010SkarelsThe 29645010Skarels.Op Fl l 29745010Skarelsoption may be used to specify the user name 29845010Skarelsto be passed to the remote system via the 29950604Scael.Ev ENVIRON 30045010Skarelsoption. 30138711SbormanWhen connecting to a non-standard port, 30243085Scael.Nm telnet 30338711Sbormanomits any automatic initiation of 30450604Scael.Tn TELNET 30538711Sbormanoptions. When the port number is preceeded by a minus sign, 30638711Sbormanthe inital option negotiation is done. 30743085ScaelAfter establishing a connection, the file 30843085Scael.Pa \&.telnetrc 30943085Scaelin the 31038711Sbormanusers home directory is opened. Lines begining with a # are 31138711Sbormancomment lines. Blank lines are ignored. Lines that begin 31238711Sbormanwithout whitespace are the start of a machine entry. The 31338711Sbormanfirst thing on the line is the name of the machine that is 31438711Sbormanbeing connected to. The rest of the line, and successive 31538711Sbormanlines that begin with whitespace are assumed to be 31643085Scael.Nm telnet 31738711Sbormancommands and are processed as if they had been typed 31838711Sbormanin manually to the 31943085Scael.Nm telnet 32038711Sbormancommand prompt. 32150604Scael.It Ic quit 32238711SbormanClose any open 32350604Scael.Tn TELNET 32443085Scaelsession and exit 32543085Scael.Nm telnet . 32638711SbormanAn end of file (in command mode) will also close a session and exit. 32750604Scael.It Ic send Ar arguments 32827692SminshallSends one or more special character sequences to the remote host. 32927692SminshallThe following are the arguments which may be specified 33027692Sminshall(more than one argument may be specified at a time): 33143085Scael.Pp 33250604Scael.Bl -tag -width escape 33350604Scael.It Ic abort 33427692SminshallSends the 33550604Scael.Dv TELNET ABORT 33650604Scael(Abort 33750604Scaelprocesses) 33827692Sminshallsequence. 33950604Scael.It Ic ao 34027692SminshallSends the 34150604Scael.Dv TELNET AO 34227692Sminshall(Abort Output) sequence, which should cause the remote system to flush 34327692Sminshallall output 34443085Scael.Em from 34527692Sminshallthe remote system 34643085Scael.Em to 34727692Sminshallthe user's terminal. 34850604Scael.It Ic ayt 34927692SminshallSends the 35050604Scael.Dv TELNET AYT 35127692Sminshall(Are You There) 35227894Skarelssequence, to which the remote system may or may not choose to respond. 35350604Scael.It Ic brk 35427692SminshallSends the 35550604Scael.Dv TELNET BRK 35638711Sborman(Break) sequence, which may have significance to the remote 35738711Sbormansystem. 35850604Scael.It Ic ec 35938711SbormanSends the 36050604Scael.Dv TELNET EC 36127692Sminshall(Erase Character) 36227692Sminshallsequence, which should cause the remote system to erase the last character 36327692Sminshallentered. 36450604Scael.It Ic el 36527692SminshallSends the 36650604Scael.Dv TELNET EL 36727692Sminshall(Erase Line) 36827692Sminshallsequence, which should cause the remote system to erase the line currently 36927692Sminshallbeing entered. 37050604Scael.It Ic eof 37127692SminshallSends the 37250604Scael.Dv TELNET EOF 37338711Sborman(End Of File) 37438711Sbormansequence. 37550604Scael.It Ic eor 37638711SbormanSends the 37750604Scael.Dv TELNET EOR 37838711Sborman(End of Record) 37938711Sbormansequence. 38050604Scael.It Ic escape 38138711SbormanSends the current 38243085Scael.Nm telnet 38343085Scaelescape character (initially \*(Lq^\*(Rq). 38450604Scael.It Ic ga 38538711SbormanSends the 38650604Scael.Dv TELNET GA 38727692Sminshall(Go Ahead) 38827692Sminshallsequence, which likely has no significance to the remote system. 38950604Scael.It Ic getstatus 39038910SbormanIf the remote side supports the 39150604Scael.Dv TELNET STATUS 39238910Sbormancommand, 39343085Scael.Ic getstatus 39438910Sbormanwill send the subnegotiation to request that the server send 39538910Sbormanits current option status. 39650604Scael.It Ic ip 39727692SminshallSends the 39850604Scael.Dv TELNET IP 39938711Sborman(Interrupt Process) sequence, which should cause the remote 40038711Sbormansystem to abort the currently running process. 40150604Scael.It Ic nop 40238711SbormanSends the 40350604Scael.Dv TELNET NOP 40427692Sminshall(No OPeration) 40527692Sminshallsequence. 40650604Scael.It Ic susp 40738711SbormanSends the 40850604Scael.Dv TELNET SUSP 40938711Sborman(SUSPend process) 41038711Sbormansequence. 41150604Scael.It Ic synch 41238711SbormanSends the 41350604Scael.Dv TELNET SYNCH 41438711Sbormansequence. 41538711SbormanThis sequence causes the remote system to discard all previously typed 41638711Sborman(but not yet read) input. 41750604ScaelThis sequence is sent as 41850604Scael.Tn TCP 41950604Scaelurgent 42050604Scaeldata (and may not work if the remote system is a 42150604Scael.Bx 4.2 42250604Scaelsystem -- if 42343085Scaelit doesn't work, a lower case \*(Lqr\*(Rq may be echoed on the terminal). 42450604Scael.It Ic \&? 42527692SminshallPrints out help information for the 42643085Scael.Ic send 42727692Sminshallcommand. 42850604Scael.El 42950604Scael.It Ic set Ar argument value 43050604Scael.It Ic unset Ar argument value 43138711SbormanThe 43243085Scael.Ic set 43338711Sbormancommand will set any one of a number of 43443085Scael.Nm telnet 43550604Scaelvariables to a specific value or to 43650604Scael.Dv TRUE . 43743085ScaelThe special value 43843085Scael.Ic off 43943085Scaelturns off the function associated with 44038711Sbormanthe variable, this is equivalent to using the 44143085Scael.Ic unset 44238711Sbormancommand. 44338711SbormanThe 44443085Scael.Ic unset 44550604Scaelcommand will disable or set to 44650604Scael.Dv FALSE 44750604Scaelany of the specified functions. 44827894SkarelsThe values of variables may be interrogated with the 44943085Scael.Ic display 45027894Skarelscommand. 45138711SbormanThe variables which may be set or unset, but not toggled, are 45238711Sbormanlisted here. In addition, any of the variables for the 45343085Scael.Ic toggle 45443085Scaelcommand may be explicitly set or unset using 45543085Scaelthe 45643085Scael.Ic set 45743085Scaeland 45843085Scael.Ic unset 45943085Scaelcommands. 46050604Scael.Bl -tag -width escape 46150604Scael.It Ic echo 46243085ScaelThis is the value (initially \*(Lq^E\*(Rq) which, when in 46343085Scael\*(Lqline by line\*(Rq mode, toggles between doing local echoing 46427692Sminshallof entered characters (for normal processing), and suppressing 46527692Sminshallechoing of entered characters (for entering, say, a password). 46650604Scael.It Ic eof 46738711SbormanIf 46843085Scael.Nm telnet 46938711Sbormanis operating in 47050604Scael.Dv LINEMODE 47143085Scaelor \*(Lqold line by line\*(Rq mode, entering this character 47238711Sbormanas the first character on a line will cause this character to be 47338711Sbormansent to the remote system. 47438711SbormanThe initial value of the eof character is taken to be the terminal's 47543085Scael.Ic eof 47638711Sbormancharacter. 47750604Scael.It Ic erase 47827692SminshallIf 47943085Scael.Nm telnet 48027692Sminshallis in 48143085Scael.Ic localchars 48227692Sminshallmode (see 48343085Scael.Ic toggle 48443085Scael.Ic localchars 48538711Sbormanbelow), 48643085Scael.Sy and 48738711Sbormanif 48843085Scael.Nm telnet 48943085Scaelis operating in \*(Lqcharacter at a time\*(Rq mode, then when this 49027692Sminshallcharacter is typed, a 49150604Scael.Dv TELNET EC 49227692Sminshallsequence (see 49343085Scael.Ic send 49443085Scael.Ic ec 49527692Sminshallabove) 49638711Sbormanis sent to the remote system. 49738711SbormanThe initial value for the erase character is taken to be 49827692Sminshallthe terminal's 49943085Scael.Ic erase 50027692Sminshallcharacter. 50150604Scael.It Ic escape 50238711SbormanThis is the 50343085Scael.Nm telnet 50443085Scaelescape character (initially \*(Lq^[\*(Rq) which causes entry 50538711Sbormaninto 50643085Scael.Nm telnet 50738711Sbormancommand mode (when connected to a remote system). 50850604Scael.It Ic flushoutput 50927692SminshallIf 51043085Scael.Nm telnet 51127692Sminshallis in 51243085Scael.Ic localchars 51327692Sminshallmode (see 51443085Scael.Ic toggle 51543085Scael.Ic localchars 51627692Sminshallbelow) 51727692Sminshalland the 51843085Scael.Ic flushoutput 51927692Sminshallcharacter is typed, a 52050604Scael.Dv TELNET AO 52127692Sminshallsequence (see 52243085Scael.Ic send 52343085Scael.Ic ao 52427692Sminshallabove) 52527692Sminshallis sent to the remote host. 52638711SbormanThe initial value for the flush character is taken to be 52727692Sminshallthe terminal's 52843085Scael.Ic flush 52927692Sminshallcharacter. 53050604Scael.It Ic interrupt 53127692SminshallIf 53243085Scael.Nm telnet 53327692Sminshallis in 53443085Scael.Ic localchars 53527692Sminshallmode (see 53643085Scael.Ic toggle 53743085Scael.Ic localchars 53827692Sminshallbelow) 53927692Sminshalland the 54043085Scael.Ic interrupt 54127692Sminshallcharacter is typed, a 54250604Scael.Dv TELNET IP 54327692Sminshallsequence (see 54443085Scael.Ic send 54543085Scael.Ic ip 54627692Sminshallabove) 54727692Sminshallis sent to the remote host. 54838711SbormanThe initial value for the interrupt character is taken to be 54927692Sminshallthe terminal's 55043085Scael.Ic intr 55127692Sminshallcharacter. 55250604Scael.It Ic kill 55327692SminshallIf 55443085Scael.Nm telnet 55527692Sminshallis in 55643085Scael.Ic localchars 55727692Sminshallmode (see 55843085Scael.Ic toggle 55943085Scael.Ic localchars 56027692Sminshallbelow), 56143085Scael.Ic and 56227692Sminshallif 56343085Scael.Nm telnet 56443085Scaelis operating in \*(Lqcharacter at a time\*(Rq mode, then when this 56527692Sminshallcharacter is typed, a 56650604Scael.Dv TELNET EL 56727692Sminshallsequence (see 56843085Scael.Ic send 56943085Scael.Ic el 57027692Sminshallabove) 57127692Sminshallis sent to the remote system. 57238711SbormanThe initial value for the kill character is taken to be 57327692Sminshallthe terminal's 57443085Scael.Ic kill 57527692Sminshallcharacter. 57650604Scael.It Ic lnext 57727692SminshallIf 57843085Scael.Nm telnet 57938711Sbormanis operating in 58050604Scael.Dv LINEMODE 58143085Scaelor \*(Lqold line by line\*(Lq mode, then this character is taken to 58238711Sbormanbe the terminal's 58343085Scael.Ic lnext 58438711Sbormancharacter. 58538711SbormanThe initial value for the lnext character is taken to be 58638711Sbormanthe terminal's 58743085Scael.Ic lnext 58838711Sbormancharacter. 58950604Scael.It Ic quit 59038711SbormanIf 59143085Scael.Nm telnet 59227692Sminshallis in 59343085Scael.Ic localchars 59427692Sminshallmode (see 59543085Scael.Ic toggle 59643085Scael.Ic localchars 59738711Sbormanbelow) 59838711Sbormanand the 59943085Scael.Ic quit 60027692Sminshallcharacter is typed, a 60150604Scael.Dv TELNET BRK 60227692Sminshallsequence (see 60343085Scael.Ic send 60443085Scael.Ic brk 60527692Sminshallabove) 60638711Sbormanis sent to the remote host. 60738711SbormanThe initial value for the quit character is taken to be 60838711Sbormanthe terminal's 60943085Scael.Ic quit 61038711Sbormancharacter. 61150604Scael.It Ic reprint 61238711SbormanIf 61343085Scael.Nm telnet 61438711Sbormanis operating in 61550604Scael.Dv LINEMODE 61643085Scaelor \*(Lqold line by line\*(Lq mode, then this character is taken to 61738711Sbormanbe the terminal's 61843085Scael.Ic reprint 61938711Sbormancharacter. 62038711SbormanThe initial value for the reprint character is taken to be 62138711Sbormanthe terminal's 62243085Scael.Ic reprint 62338711Sbormancharacter. 62450604Scael.It Ic start 62538711SbormanIf the 62650604Scael.Dv TELNET TOGGLE-FLOW-CONTROL 62738711Sbormanoption has been enabled, 62838711Sbormanthen this character is taken to 62938711Sbormanbe the terminal's 63043085Scael.Ic start 63138711Sbormancharacter. 63227692SminshallThe initial value for the kill character is taken to be 63327692Sminshallthe terminal's 63443085Scael.Ic start 63527692Sminshallcharacter. 63650604Scael.It Ic stop 63738711SbormanIf the 63850604Scael.Dv TELNET TOGGLE-FLOW-CONTROL 63938711Sbormanoption has been enabled, 64038711Sbormanthen this character is taken to 64138711Sbormanbe the terminal's 64243085Scael.Ic stop 64338711Sbormancharacter. 64438711SbormanThe initial value for the kill character is taken to be 64538711Sbormanthe terminal's 64643085Scael.Ic stop 64738711Sbormancharacter. 64850604Scael.It Ic susp 64927692SminshallIf 65043085Scael.Nm telnet 65138711Sbormanis in 65243085Scael.Ic localchars 65338711Sbormanmode, or 65450604Scael.Dv LINEMODE 65538711Sbormanis enabled, and the 65643085Scael.Ic suspend 65738711Sbormancharacter is typed, a 65850604Scael.Dv TELNET SUSP 65938711Sbormansequence (see 66043085Scael.Ic send 66143085Scael.Ic susp 66238711Sbormanabove) 66338711Sbormanis sent to the remote host. 66438711SbormanThe initial value for the suspend character is taken to be 66538711Sbormanthe terminal's 66643085Scael.Ic suspend 66727692Sminshallcharacter. 66850604Scael.It Ic tracefile 66943085ScaelThi is the file to which the output, caused by 67043085Scael.Ic netdata 67143085Scaelor 67243085Scael.Ic option 67350604Scaeltracing being 67450604Scael.Dv TRUE , 67550604Scaelwill be written. If it is set to 67643085Scael.Dq Fl , 67738711Sbormanthen tracing information will be written to standard output (the default). 67850604Scael.It Ic worderase 67938711SbormanIf 68043085Scael.Nm telnet 68138711Sbormanis operating in 68250604Scael.Dv LINEMODE 68343085Scaelor \*(Lqold line by line\*(Lq mode, then this character is taken to 68438711Sbormanbe the terminal's 68543085Scael.Ic worderase 68638711Sbormancharacter. 68738711SbormanThe initial value for the worderase character is taken to be 68838711Sbormanthe terminal's 68943085Scael.Ic worderase 69038711Sbormancharacter. 69150604Scael.It Ic \&? 69245010SkarelsDisplays the legal 69345010Skarels.Ic set 69445010Skarels.Pq Ic unset 69545010Skarelscommands. 69650604Scael.El 69750604Scael.It Ic slc Ar state 69838711SbormanThe 69943085Scael.Ic slc 70038711Sbormancommand (Set Local Characters) is used to set 70138711Sbormanor change the state of the the special 70243085Scaelcharacters when the 70350604Scael.Dv TELNET LINEMODE 70443085Scaeloption has 70538711Sbormanbeen enabled. Special characters are characters that get 70643085Scaelmapped to 70750604Scael.Tn TELNET 70843085Scaelcommands sequences (like 70943085Scael.Ic ip 71038711Sbormanor 71143085Scael.Ic quit ) 71238711Sbormanor line editing characters (like 71343085Scael.Ic erase 71438711Sbormanand 71543085Scael.Ic kill ) . 71638711SbormanBy default, the local special characters are exported. 71750604Scael.Bl -tag -width Fl 71850604Scael.It Ic export 71938711SbormanSwitch to the local defaults for the special characters. The 72038711Sbormanlocal default characters are those of the local terminal at 72138711Sbormanthe time when 72243085Scael.Nm telnet 72338711Sbormanwas started. 72450604Scael.It Ic import 72538711SbormanSwitch to the remote defaults for the special characters. 72638711SbormanThe remote default characters are those of the remote system 72743085Scaelat the time when the 72850604Scael.Tn TELNET 72943085Scaelconnection was established. 73050604Scael.It Ic check 73138711SbormanVerify the current settings for the current special characters. 73238711SbormanThe remote side is requested to send all the current special 73338711Sbormancharacter settings, and if there are any discrepencies with 73438711Sbormanthe local side, the local side will switch to the remote value. 73550604Scael.It Ic \&? 73638711SbormanPrints out help information for the 73743085Scael.Ic slc 73838711Sbormancommand. 73950604Scael.El 74050604Scael.It Ic environ Ar arguments... 74145010SkarelsThe 74245010Skarels.Ic environ 74345010Skarelscommand is used to manipulate the 74445010Skarelsthe variables that my be sent through the 74550604Scael.Dv TELNET ENVIRON 74645010Skarelsoption. 74745010SkarelsThe initial set of variables is taken from the users 74845010Skarelsenvironment, with only the 74945010Skarels.Ev DISPLAY 75045010Skarelsand 75145010Skarels.Ev PRINTER 75245010Skarelsvariables being exported by default. 75345010SkarelsThe 75445010Skarels.Ev USER 75545010Skarelsvariable is also exported if the 75645010Skarels.Fl a 75745010Skarelsor 75845010Skarels.Fl l 75945010Skarelsoptions are used. 76045010Skarels.br 76150604ScaelValid arguments for the 76250604Scael.Ic environ 76350604Scaelcommand are: 76450604Scael.Bl -tag -width Fl 76550604Scael.It Ic define Ar variable value 76645010SkarelsDefine the variable 76745010Skarels.Ar variable 76845010Skarelsto have a value of 76945010Skarels.Ar value. 77045010SkarelsAny variables defined by this command are automatically exported. 77145010SkarelsThe 77245010Skarels.Ar value 77345010Skarelsmay be enclosed in single or double quotes so 77445010Skarelsthat tabs and spaces may be included. 77550604Scael.It Ic undefine Ar variable 77645010SkarelsRemove 77745010Skarels.Ar variable 77845010Skarelsfrom the list of environment variables. 77950604Scael.It Ic export Ar variable 78045010SkarelsMark the variable 78145010Skarels.Ar variable 78245010Skarelsto be exported to the remote side. 78350604Scael.It Ic unexport Ar variable 78445010SkarelsMark the variable 78545010Skarels.Ar variable 78645010Skarelsto not be exported unless 78745010Skarelsexplicitly asked for by the remote side. 78850604Scael.It Ic list 78945010SkarelsList the current set of environment variables. 79050604ScaelThose marked with a 79150604Scael.Cm * 79250604Scaelwill be sent automatically, 79345010Skarelsother variables will only be sent if explicitly requested. 79450604Scael.It Ic \&? 79545010SkarelsPrints out help information for the 79645010Skarels.Ic environ 79745010Skarelscommand. 79850604Scael.El 79950604Scael.It Ic toggle Ar arguments ... 80027692SminshallToggle (between 80150604Scael.Dv TRUE 80227692Sminshalland 80350604Scael.Dv FALSE ) 80427692Sminshallvarious flags that control how 80543085Scael.Nm telnet 80627692Sminshallresponds to events. 80750604ScaelThese flags may be set explicitly to 80850604Scael.Dv TRUE 80950604Scaelor 81050604Scael.Dv FALSE 81138711Sbormanusing the 81243085Scael.Ic set 81338711Sbormanand 81443085Scael.Ic unset 81538711Sbormancommands listed above. 81627692SminshallMore than one argument may be specified. 81727894SkarelsThe state of these flags may be interrogated with the 81843085Scael.Ic display 81927894Skarelscommand. 82027692SminshallValid arguments are: 82150604Scael.Bl -tag -width Ar 82250604Scael.It Ic autoflush 82327692SminshallIf 82443085Scael.Ic autoflush 82527692Sminshalland 82643085Scael.Ic localchars 82727692Sminshallare both 82850604Scael.Dv TRUE , 82927692Sminshallthen when the 83043085Scael.Ic ao , 83127692Sminshallor 83243085Scael.Ic quit 83327692Sminshallcharacters are recognized (and transformed into 83450604Scael.Tn TELNET 83527692Sminshallsequences; see 83643085Scael.Ic set 83727692Sminshallabove for details), 83843085Scael.Nm telnet 83927692Sminshallrefuses to display any data on the user's terminal 84027692Sminshalluntil the remote system acknowledges (via a 84150604Scael.Dv TELNET TIMING MARK 84227692Sminshalloption) 84327692Sminshallthat it has processed those 84450604Scael.Tn TELNET 84527692Sminshallsequences. 84650604ScaelThe initial value for this toggle is 84750604Scael.Dv TRUE 84850604Scaelif the terminal user had not 84950604Scaeldone an "stty noflsh", otherwise 85050604Scael.Dv FALSE 85150604Scael(see 85243085Scael.Xr stty 1 ) . 85350604Scael.It Ic autosynch 85427894SkarelsIf 85543085Scael.Ic autosynch 85627894Skarelsand 85743085Scael.Ic localchars 85827894Skarelsare both 85950604Scael.Dv TRUE , 86027894Skarelsthen when either the 86143085Scael.Ic intr 86227894Skarelsor 86343085Scael.Ic quit 86427894Skarelscharacters is typed (see 86543085Scael.Ic set 86627894Skarelsabove for descriptions of the 86743085Scael.Ic intr 86827894Skarelsand 86943085Scael.Ic quit 87027894Skarelscharacters), the resulting 87150604Scael.Tn TELNET 87227894Skarelssequence sent is followed by the 87350604Scael.Dv TELNET SYNCH 87427894Skarelssequence. 87527894SkarelsThis procedure 87643085Scael.Ic should 87727894Skarelscause the remote system to begin throwing away all previously 87827894Skarelstyped input until both of the 87950604Scael.Tn TELNET 88027894Skarelssequences have been read and acted upon. 88150604ScaelThe initial value of this toggle is 88250604Scael.Dv FALSE . 88350604Scael.It Ic binary 88438711SbormanEnable or disable the 88550604Scael.Dv TELNET BINARY 88638910Sbormanoption on both input and output. 88750604Scael.It Ic inbinary 88838910SbormanEnable or disable the 88950604Scael.Dv TELNET BINARY 89038910Sbormanoption on input. 89150604Scael.It Ic outbinary 89238910SbormanEnable or disable the 89350604Scael.Dv TELNET BINARY 89438910Sbormanoption on output. 89550604Scael.It Ic crlf 89650604ScaelIf this is 89750604Scael.Dv TRUE , 89850604Scaelthen carriage returns will be sent as 89950604Scael.Li <CR><LF> . 90050604ScaelIf this is 90150604Scael.Dv FALSE , 90250604Scaelthen carriage returns will be send as 90350604Scael.Li <CR><NUL> . 90450604ScaelThe initial value for this toggle is 90550604Scael.Dv FALSE . 90650604Scael.It Ic crmod 90727692SminshallToggle carriage return mode. 90827692SminshallWhen this mode is enabled, most carriage return characters received from 90927692Sminshallthe remote host will be mapped into a carriage return followed by 91027692Sminshalla line feed. 91127692SminshallThis mode does not affect those characters typed by the user, only 91227692Sminshallthose received from the remote host. 91327692SminshallThis mode is not very useful unless the remote host 91427692Sminshallonly sends carriage return, but never line feed. 91550604ScaelThe initial value for this toggle is 91650604Scael.Dv FALSE . 91750604Scael.It Ic debug 91827692SminshallToggles socket level debugging (useful only to the 91943085Scael.Ic super user ) . 92050604ScaelThe initial value for this toggle is 92150604Scael.Dv FALSE . 92250604Scael.It Ic localchars 92338711SbormanIf this is 92450604Scael.Dv TRUE , 92538711Sbormanthen the 92643085Scael.Ic flush , 92745010Skarels.Ic interrupt , 92843085Scael.Ic quit , 92945010Skarels.Ic erase , 93038711Sbormanand 93143085Scael.Ic kill 93238711Sbormancharacters (see 93343085Scael.Ic set 93438711Sbormanabove) are recognized locally, and transformed into (hopefully) appropriate 93550604Scael.Tn TELNET 93638711Sbormancontrol sequences 93738711Sborman(respectively 93843085Scael.Ic ao , 93945010Skarels.Ic ip , 94043085Scael.Ic brk , 94145010Skarels.Ic ec , 94238711Sbormanand 94343085Scael.Ic el ; 94438711Sbormansee 94543085Scael.Ic send 94638711Sbormanabove). 94750604ScaelThe initial value for this toggle is 94850604Scael.Dv TRUE 94950604Scaelin \*(Lqold line by line\*(Rq mode, 95050604Scaeland 95150604Scael.Dv FALSE 95250604Scaelin \*(Lqcharacter at a time\*(Rq mode. 95338711SbormanWhen the 95450604Scael.Dv LINEMODE 95538711Sbormanoption is enabled, the value of 95643085Scael.Ic localchars 95750604Scaelis ignored, and assumed to always be 95850604Scael.Dv TRUE . 95938711SbormanIf 96050604Scael.Dv LINEMODE 96138711Sbormanhas ever been enabled, then 96243085Scael.Ic quit 96338711Sbormanis sent as 96443085Scael.Ic abort , 96538711Sbormanand 96643085Scael.Ic eof and 96738711Sborman.B suspend 96838711Sbormanare sent as 96943085Scael.Ic eof and 97045010Skarels.Ic susp , 97138711Sbormansee 97243085Scael.Ic send 97338711Sbormanabove). 97450604Scael.It Ic netdata 97538711SbormanToggles the display of all network data (in hexadecimal format). 97650604ScaelThe initial value for this toggle is 97750604Scael.Dv FALSE . 97850604Scael.It Ic options 97927692SminshallToggles the display of some internal 98043085Scael.Nm telnet 98127692Sminshallprotocol processing (having to do with 98250604Scael.Tn TELNET 98327692Sminshalloptions). 98450604ScaelThe initial value for this toggle is 98550604Scael.Dv FALSE . 98650604Scael.It Ic prettydump 98738711SbormanWhen the 98843085Scael.Ic netdata 98938711Sbormantoggle is enabled, if 99043085Scael.Ic prettydump 99138711Sbormanis enabled the output from the 99243085Scael.Ic netdata 99338711Sbormancommand will be formated in a more user readable format. 99438711SbormanSpaces are put between each character in the output, and the 99538711Sbormanbegining of any 99650604Scael.Tn TELNET 99738711Sbormanescape sequence is preceeded by a '*' to aid in locating them. 99850604Scael.It Ic \&? 99927692SminshallDisplays the legal 100043085Scael.Ic toggle 100127692Sminshallcommands. 100250604Scael.El 100350604Scael.It Ic z 100438711SbormanSuspend 100543085Scael.Nm telnet . 100643085ScaelThis command only works when the user is using the 100743085Scael.Xr csh 1 . 100850604Scael.It Ic \&! Op Ar command 100938711SbormanExecute a single command in a subshell on the local 101043085Scaelsystem. If 101143085Scael.Ic command 101243085Scaelis ommitted, then an interactive 101338711Sbormansubshell is invoked. 101450604Scael.It Ic status 101543085ScaelShow the current status of 101643085Scael.Nm telnet . 101738711SbormanThis includes the peer one is connected to, as well 101838711Sbormanas the current mode. 101950604Scael.It Ic \&? Op Ar command 102038711SbormanGet help. With no arguments, 102143085Scael.Nm telnet 102238711Sbormanprints a help summary. 102343085ScaelIf a command is specified, 102443085Scael.Nm telnet 102538711Sbormanwill print the help information for just that command. 102650604Scael.El 102743085Scael.Sh ENVIRONMENT 102843085Scael.Nm Telnet 102945010Skarelsuses at least the 103043085Scael.Ev HOME , 103145010Skarels.Ev SHELL , 103245010Skarels.Ev DISPLAY , 103343085Scaeland 103443085Scael.Ev TERM 103543085Scaelenvironent variables. 103645010SkarelsOther envirnoment variables may be propogated 103745010Skarelsto the other side via the 103850604Scael.Dv TELNET ENVIRON 103945010Skarelsoption. 104043085Scael.Sh FILES 104150604Scael.Bl -tag -width ~/.telnetrc -compact 104250604Scael.It Pa ~/.telnetrc 104343085Scaeluser customized telnet startup values 104450604Scael.El 104543085Scael.Sh HISTORY 104650604ScaelThe 104743085Scael.Nm Telnet 104850604Scaelcommand appeared in 104950604Scael.Bx 4.2 . 105043085Scael.Sh NOTES 105143085Scael.Pp 105227692SminshallOn some remote systems, echo has to be turned off manually when in 105343085Scael\*(Lqold line by line\*(Rq mode. 105443085Scael.Pp 105543085ScaelIn \*(Lqold line by line\*(Rq mode or 105650604Scael.Dv LINEMODE 105743085Scaelthe terminal's 105843085Scael.Ic eof 105927692Sminshallcharacter is only recognized (and sent to the remote system) 106027692Sminshallwhen it is the first character on a line. 1061