4.3BSD-Reno/share/man/cat1/telnet.0

Compare this file to the similar file:
Show the results in this format:

TELNET(1)		    UNIX Reference Manual		     TELNET(1)

NNAAMMEE
     tteellnneett - User interface to the TELNET protocol

SSYYNNOOPPSSIISS
     tteellnneett [--dd] [--aa] [--nn _t_r_a_c_e_f_i_l_e] [--ee _e_s_c_a_p_e_c_h_a_r] [[--ll _u_s_e_r] _h_o_s_t [port]]

DDEESSCCRRIIPPTTIIOONN
     The tteellnneett command is used to communicate with another host using the
     TELNET protocol.  If tteellnneett is invoked without the _h_o_s_t argument, it
     enters command mode, indicated by its prompt (tteellnneett>>).  In this mode, it
     accepts and executes the commands listed below.  If it is invoked with
     arguments, it performs an ooppeenn command with those arguments.

     Options:

     --dd        Sets the initial value of the ddeebbuugg toggle to TRUE

     --aa        Attempt automatic login.  Currently, this sends the user name
	       via the USER variable of the ENVIRON option if supported by the
	       remote system.  The name used is that of the current user as
	       returned by getlogin(2) if it agrees with the current user ID,
	       otherwise it is the name associated with the user ID.

     --nn _t_r_a_c_e_f_i_l_e
	       Opens _t_r_a_c_e_f_i_l_e for recording trace information.  See the sseett
	       ttrraacceeffiillee command below.

     --ll _u_s_e_r   When connecting to the remote system, if the remote system
	       understands the ENVIRON option, then _u_s_e_r will be sent to the
	       remote system as the value for the variable USER.  This option
	       implies the --aa option.  This option may also be used with the
	       ooppeenn command.

     --ee _e_s_c_a_p_e _c_h_a_r
	       Sets the initial tteellnneett escape character to _e_s_c_a_p_e _c_h_a_r.  If
	       _e_s_c_a_p_e _c_h_a_r is ommitted, then there will be no escape charac-
	       ter.

     _h_o_s_t      Indicates the official name, an alias, or the Internet address
	       of a remote host.

     _p_o_r_t      Indicates a port number (address of an application).  If a
	       number is not specified, the default tteellnneett port is used.

     Once a connection has been opened, tteellnneett will attempt to enable the
     TELNET LINEMODE option.  If this fails, then tteellnneett will revert to one of
     two input modes: either ``character at a time'' or ``old line by line''
     depending on what the remote system supports.

     When LINEMODE is enabled, character processing is done on the local sys-
     tem, under the control of the remote system.  When input editing or char-
     acter echoing is to be disabled, the remote system will relay that infor-
     mation.  The remote system will also relay changes to any special charac-
     ters that happen on the remote system, so that they can take effect on
     the local system.

     In ``character at a time'' mode, most text typed is immediately sent to
     the remote host for processing.

     In ``old line by line'' mode, all text is echoed locally, and (normally)
     only completed lines are sent to the remote host.	The ``local echo char-
     acter'' (initially ``^E'') may be used to turn off and on the local echo
     (this would mostly be used to enter passwords without the password being
     echoed).
     If the LINEMODE option is enabled, or if the llooccaallcchhaarrss toggle is TRUE
     (the default for ``old line by line``; see below), the user's qquuiitt, iinnttrr,
     and fflluusshh characters are trapped locally, and sent as TELNET protocol se-
     quences to the remote side.  If LINEMODE has ever been enabled, then the
     user's ssuusspp and eeooff are also sent as TELNET protocol sequences, and qquuiitt
     is sent as a TELNET ABORT instead of BREAK There are options (see ttooggggllee
     aauuttoofflluusshh and ttooggggllee aauuttoossyynncchh below) which cause this action to flush
     subsequent output to the terminal (until the remote host acknowledges the
     TELNET sequence) and flush previous terminal input (in the case of qquuiitt
     and iinnttrr).

     While connected to a remote host, tteellnneett command mode may be entered by
     typing the tteellnneett ``escape character'' (initially ``^ When in command
     mode, the normal terminal editing conventions are available.

     The following .Nm telnet commands are available.  Only enough of each
     command to uniquely identify it need be typed (this is also true for ar-
     guments to the mmooddee, sseett, ttooggggllee, uunnsseett, ssllcc, eennvviirroonn, and ddiissppllaayy com-
     mands).

     cclloossee     Close a TELNET session and return to command mode.

     ddiissppllaayy _a_r_g_u_m_e_n_t ...
	       Displays all, or some, of the sseett and ttooggggllee values (see
	       below).

     mmooddee _t_y_p_e
	       _T_y_p_e is one of several options, depending on the state of the
	       TELNET session.	The remote host is asked for permission to go
	       into the requested mode.  If the remote host is capable of
	       entering that mode, the requested mode will be entered.

	       cchhaarraacctteerr   Disable the TELNET LINEMODE option, or, if the re-
			   mote side does not understand the LINEMODE option,
			   then enter ``character at a time`` mode.

	       lliinnee	   Enable the TELNET LINEMODE option, or, if the re-
			   mote side does not understand the LINEMODE option,
			   then attempt to enter ``old-line-by-line`` mode.

	       iissiigg (--iissiigg)
			   Attempt to enable (disable) the TRAPSIG mode of the
			   LINEMODE option.  This requires that the LINEMODE
			   option be enabled.

	       eeddiitt (--eeddiitt)
			   Attempt to enable (disable) the EDIT mode of the
			   LINEMODE option.  This requires that the LINEMODE
			   option be enabled.

	       ssooffttttaabbss (--ssooffttttaabbss)
			   Attempt to enable (disable) the SOFT_TAB mode of
			   the LINEMODE option.  This requires that the
			   LINEMODE option be enabled.

	       lliitteecchhoo (--lliitteecchhoo)
			   Attempt to enable (disable) the LIT_ECHO mode of
			   the LINEMODE option.  This requires that the
			   LINEMODE option be enabled.

	       ??	   Prints out help information for the mmooddee command.

     ooppeenn _h_o_s_t [[--ll] _u_s_e_r][[--] _p_o_r_t]
	       Open a connection to the named host.  If no port number is
	       specified, tteellnneett will attempt to contact a TELNET server at
	       the default port.  The host specification may be either a host
	       name (see hosts(5)) or an Internet address specified in the
	       ``dot notation'' (see inet(3)).	The [--ll] option may be used to
	       specify the user name to be passed to the remote system via the
	       ENVIRON option.	When connecting to a non-standard port, tteellnneett
	       omits any automatic initiation of TELNET options.  When the
	       port number is preceeded by a minus sign, the inital option
	       negotiation is done.  After establishing a connection, the file
	       ._t_e_l_n_e_t_r_c in the users home directory is opened.  Lines begin-
	       ing with a # are comment lines.	Blank lines are ignored.
	       Lines that begin without whitespace are the start of a machine
	       entry.  The first thing on the line is the name of the machine
	       that is being connected to.  The rest of the line, and succes-
	       sive lines that begin with whitespace are assumed to be tteellnneett
	       commands and are processed as if they had been typed in manual-
	       ly to the tteellnneett command prompt.

     qquuiitt      Close any open TELNET session and exit tteellnneett.  An end of file
	       (in command mode) will also close a session and exit.

     sseenndd _a_r_g_u_m_e_n_t_s
	       Sends one or more special character sequences to the remote
	       host.  The following are the arguments which may be specified
	       (more than one argument may be specified at a time):

	       aabboorrtt
		     Sends the TELNET ABORT (ABORT processes) sequence.

	       aaoo    Sends the TELNET AO (Abort Output) sequence, which should
		     cause the remote system to flush all output _f_r_o_m the re-
		     mote system _t_o the user's terminal.

	       aayytt   Sends the TELNET AYT (Are You There) sequence, to which
		     the remote system may or may not choose to respond.

	       bbrrkk   Sends the TELNET BRK (Break) sequence, which may have
		     significance to the remote system.

	       eecc    Sends the TELNET EC (Erase Character) sequence, which
		     should cause the remote system to erase the last charac-
		     ter entered.

	       eell    Sends the TELNET EL (Erase Line) sequence, which should
		     cause the remote system to erase the line currently being
		     entered.

	       eeooff   Sends the TELNET EOF (End Of File) sequence.

	       eeoorr   Sends the TELNET EOR (End of Record) sequence.

	       eessccaappee
		     Sends the current tteellnneett escape character (initially
		     ``^'').

	       ggaa    Sends the TELNET GA (Go Ahead) sequence, which likely has
		     no significance to the remote system.

	       ggeettssttaattuuss
		     If the remote side supports the TELNET STATUS command,
		     ggeettssttaattuuss will send the subnegotiation to request that
		     the server send its current option status.

	       iipp    Sends the TELNET IP (Interrupt Process) sequence, which
		     should cause the remote system to abort the currently
		     running process.

	       nnoopp   Sends the TELNET NOP (No OPeration) sequence.
	       ssuusspp
		     Sends the TELNET SUSP (SUSPend process) sequence.

	       ssyynncchh
		     Sends the TELNET SYNCH sequence.  This sequence causes
		     the remote system to discard all previously typed (but
		     not yet read) input.  This sequence is sent as TCP urgent
		     data (and may not work if the remote system is a 4.2 BSD
		     system -- if it doesn't work, a lower case ``r'' may be
		     echoed on the terminal).

	       ??     Prints out help information for the sseenndd command.

     sseett _a_r_g_u_m_e_n_t _v_a_l_u_e

     uunnsseett _a_r_g_u_m_e_n_t _v_a_l_u_e
	       The sseett command will set any one of a number of tteellnneett vari-
	       ables to a specific value or to TRUE.  The special value ooffff
	       turns off the function associated with the variable, this is
	       equivalent to using the uunnsseett command.  The uunnsseett command will
	       disable or set to FALSE any of the specified functions.	The
	       values of variables may be interrogated with the ddiissppllaayy com-
	       mand.  The variables which may be set or unset, but not tog-
	       gled, are listed here.  In addition, any of the variables for
	       the ttooggggllee command may be explicitly set or unset using the sseett
	       and uunnsseett commands.

	       eecchhoo	 This is the value (initially ``^E'') which, when in
			 ``line by line'' mode, toggles between doing local
			 echoing of entered characters (for normal process-
			 ing), and suppressing echoing of entered characters
			 (for entering, say, a password).

	       eeooff	 If tteellnneett is operating in LINEMODE or ``old line by
			 line'' mode, entering this character as the first
			 character on a line will cause this character to be
			 sent to the remote system.  The initial value of the
			 eof character is taken to be the terminal's eeooff char-
			 acter.

	       eerraassee	 If tteellnneett is in llooccaallcchhaarrss mode (see ttooggggllee
			 llooccaallcchhaarrss below), aanndd if tteellnneett is operating in
			 ``character at a time'' mode, then when this charac-
			 ter is typed, a TELNET EC sequence (see sseenndd eecc
			 above) is sent to the remote system.  The initial
			 value for the erase character is taken to be the
			 terminal's eerraassee character.

	       eessccaappee	 This is the tteellnneett escape character (initially
			 ``^['') which causes entry into tteellnneett command mode
			 (when connected to a remote system).

	       fflluusshhoouuttppuutt
			 If tteellnneett is in llooccaallcchhaarrss mode (see ttooggggllee
			 llooccaallcchhaarrss below) and the fflluusshhoouuttppuutt character is
			 typed, a TELNET AO sequence (see sseenndd aaoo above) is
			 sent to the remote host.  The initial value for the
			 flush character is taken to be the terminal's fflluusshh
			 character.

	       iinntteerrrruupptt
			 If tteellnneett is in llooccaallcchhaarrss mode (see ttooggggllee
			 llooccaallcchhaarrss below) and the iinntteerrrruupptt character is
			 typed, a TELNET IP sequence (see sseenndd iipp above) is
			 sent to the remote host.  The initial value for the
			 interrupt character is taken to be the terminal's
			 iinnttrr character.

	       kkiillll	 If tteellnneett is in llooccaallcchhaarrss mode (see ttooggggllee
			 llooccaallcchhaarrss below), aanndd if tteellnneett is operating in
			 ``character at a time'' mode, then when this charac-
			 ter is typed, a TELNET EL sequence (see sseenndd eell
			 above) is sent to the remote system.  The initial
			 value for the kill character is taken to be the
			 terminal's kkiillll character.

	       llnneexxtt	 If tteellnneett is operating in LINEMODE or ``old line by
			 line`` mode, then this character is taken to be the
			 terminal's llnneexxtt character.  The initial value for
			 the lnext character is taken to be the terminal's
			 llnneexxtt character.

	       qquuiitt	 If tteellnneett is in llooccaallcchhaarrss mode (see ttooggggllee
			 llooccaallcchhaarrss below) and the qquuiitt character is typed, a
			 TELNET BRK sequence (see sseenndd bbrrkk above) is sent to
			 the remote host.  The initial value for the quit
			 character is taken to be the terminal's qquuiitt charac-
			 ter.

	       rreepprriinntt	 If tteellnneett is operating in LINEMODE or ``old line by
			 line`` mode, then this character is taken to be the
			 terminal's rreepprriinntt character.	The initial value for
			 the reprint character is taken to be the terminal's
			 rreepprriinntt character.

	       ssttaarrtt	 If the TELNET TOGGLE-FLOW-CONTROL option has been en-
			 abled, then this character is taken to be the
			 terminal's ssttaarrtt character.  The initial value for
			 the kill character is taken to be the terminal's
			 ssttaarrtt character.

	       ssttoopp	 If the TELNET TOGGLE-FLOW-CONTROL option has been en-
			 abled, then this character is taken to be the
			 terminal's ssttoopp character.  The initial value for the
			 kill character is taken to be the terminal's ssttoopp
			 character.

	       ssuusspp	 If tteellnneett is in llooccaallcchhaarrss mode, or LINEMODE is en-
			 abled, and the ssuussppeenndd character is typed, a TELNET
			 SUSP sequence (see sseenndd ssuusspp above) is sent to the
			 remote host.  The initial value for the suspend char-
			 acter is taken to be the terminal's ssuussppeenndd charac-
			 ter.

	       ttrraacceeffiillee
			 Thi is the file to which the output, caused by
			 nneettddaattaa or ooppttiioonn tracing being TRUE, will be writ-
			 ten.  If it is set to ``--'', then tracing information
			 will be written to standard output (the default).

	       wwoorrddeerraassee
			 If tteellnneett is operating in LINEMODE or ``old line by
			 line`` mode, then this character is taken to be the
			 terminal's wwoorrddeerraassee character.  The initial value
			 for the worderase character is taken to be the
			 terminal's wwoorrddeerraassee character.

	       ??	 Displays the legal sseett (uunnsseett) commands.

     ssllcc _s_t_a_t_e
	       The ssllcc command (Set Local Characters) is used to set or change
	       the state of the the special characters when the TELNET
	       LINEMODE option has been enabled.  Special characters are char-
	       acters that get mapped to TELNET commands sequences (like iipp or
	       qquuiitt) or line editing characters (like eerraassee and kkiillll).	By de-
	       fault, the local special characters are exported.

	       eexxppoorrtt	 Switch to the local defaults for the special charac-
			 ters.	The local default characters are those of the
			 local terminal at the time when tteellnneett was started.

	       iimmppoorrtt	 Switch to the remote defaults for the special charac-
			 ters.	The remote default characters are those of the
			 remote system at the time when the TELNET connection
			 was established.

	       cchheecckk	 Verify the current settings for the current special
			 characters.  The remote side is requested to send all
			 the current special character settings, and if there
			 are any discrepencies with the local side, the local
			 side will switch to the remote value.

	       ??	 Prints out help information for the ssllcc command.

     eennvviirroonn _a_r_g_u_m_e_n_t_s...
	       The eennvviirroonn command is used to manipulate the the variables
	       that my be sent through the TELNET ENVIRON option.  The initial
	       set of variables is taken from the users environment, with only
	       the DISPLAY and PRINTER variables being exported by default.
	       The USER variable is also exported if the --aa or --ll options are
	       used.
	       Valid arguments for the eennvviirroonn command are:

	       ddeeffiinnee _v_a_r_i_a_b_l_e _v_a_l_u_e
			 Define the variable _v_a_r_i_a_b_l_e to have a value of
			 _v_a_l_u_e.  Any variables defined by this command are au-
			 tomatically exported.	The _v_a_l_u_e may be enclosed in
			 single or double quotes so that tabs and spaces may
			 be included.

	       uunnddeeffiinnee _v_a_r_i_a_b_l_e
			 Remove _v_a_r_i_a_b_l_e from the list of environment vari-
			 ables.

	       eexxppoorrtt _v_a_r_i_a_b_l_e
			 Mark the variable _v_a_r_i_a_b_l_e to be exported to the re-
			 mote side.

	       uunneexxppoorrtt _v_a_r_i_a_b_l_e
			 Mark the variable _v_a_r_i_a_b_l_e to not be exported unless
			 explicitly asked for by the remote side.

	       lliisstt	 List the current set of environment variables.  Those
			 marked with a ** will be sent automatically, other
			 variables will only be sent if explicitly requested.

	       ??	 Prints out help information for the eennvviirroonn command.

     ttooggggllee _a_r_g_u_m_e_n_t_s ...
	       Toggle (between TRUE and FALSE) various flags that control how
	       tteellnneett responds to events.  These flags may be set explicitly
	       to TRUE or FALSE using the sseett and uunnsseett commands listed above.
	       More than one argument may be specified.  The state of these
	       flags may be interrogated with the ddiissppllaayy command.  Valid ar-
	       guments are:

	       aauuttoofflluusshh   If aauuttoofflluusshh and llooccaallcchhaarrss are both TRUE, then
			   when the aaoo, or qquuiitt characters are recognized (and
			   transformed into TELNET sequences; see sseett above
			   for details), tteellnneett refuses to display any data on
			   the user's terminal until the remote system ack-
			   nowledges (via a TELNET TIMING MARK option) that it
			   has processed those TELNET sequences.  The initial
			   value for this toggle is TRUE if the terminal user
			   had not done an "stty noflsh", otherwise FALSE (see
			   stty(1)).

	       aauuttoossyynncchh   If aauuttoossyynncchh and llooccaallcchhaarrss are both TRUE, then
			   when either the iinnttrr or qquuiitt characters is typed
			   (see sseett above for descriptions of the iinnttrr and
			   qquuiitt characters), the resulting TELNET sequence
			   sent is followed by the TELNET SYNCH sequence.
			   This procedure sshhoouulldd cause the remote system to
			   begin throwing away all previously typed input un-
			   til both of the TELNET sequences have been read and
			   acted upon.	The initial value of this toggle is
			   FALSE.

	       bbiinnaarryy	   Enable or disable the TELNET BINARY option on both
			   input and output.

	       iinnbbiinnaarryy    Enable or disable the TELNET BINARY option on in-
			   put.

	       oouuttbbiinnaarryy   Enable or disable the TELNET BINARY option on out-
			   put.

	       ccrrllff	   If this is TRUE, then carriage returns will be sent
			   as <CR><LF>.  If this is FALSE, then carriage re-
			   turns will be send as <CR><NUL>.  The initial value
			   for this toggle is FALSE.

	       ccrrmmoodd	   Toggle carriage return mode.  When this mode is en-
			   abled, most carriage return characters received
			   from the remote host will be mapped into a carriage
			   return followed by a line feed.  This mode does not
			   affect those characters typed by the user, only
			   those received from the remote host.  This mode is
			   not very useful unless the remote host only sends
			   carriage return, but never line feed.  The initial
			   value for this toggle is FALSE.

	       ddeebbuugg	   Toggles socket level debugging (useful only to the
			   ssuuppeerr uusseerr).  The initial value for this toggle is
			   FALSE.

	       llooccaallcchhaarrss
			   If this is TRUE, then the fflluusshh, iinntteerrrruupptt, qquuiitt,
			   eerraassee, and kkiillll characters (see sseett above) are
			   recognized locally, and transformed into (hopeful-
			   ly) appropriate TELNET control sequences (respec-
			   tively aaoo, iipp, bbrrkk, eecc, and eell; see sseenndd above).
			   The initial value for this toggle is TRUE in ``old
			   line by line'' mode, and FALSE in ``character at a
			   time'' mode.  When the LINEMODE option is enabled,
			   the value of llooccaallcchhaarrss is ignored, and assumed to
			   always be TRUE.  If LINEMODE has ever been enabled,
			   then qquuiitt is sent as aabboorrtt, and eeooff aanndd are sent as
			   eeooff aanndd ssuusspp, see sseenndd above).

	       nneettddaattaa	   Toggles the display of all network data (in hexade-
			   cimal format).  The initial value for this toggle
			   is FALSE.

	       ooppttiioonnss	   Toggles the display of some internal tteellnneett proto-
			   col processing (having to do with TELNET options).
			   The initial value for this toggle is FALSE.

	       pprreettttyydduummpp
			   When the nneettddaattaa toggle is enabled, if pprreettttyydduummpp
			   is enabled the output from the nneettddaattaa command will
			   be formated in a more user readable format.	Spaces
			   are put between each character in the output, and
			   the begining of any TELNET escape sequence is pre-
			   ceeded by a '*' to aid in locating them.

	       ??	   Displays the legal ttooggggllee commands.

     zz	       Suspend tteellnneett.	This command only works when the user is using
	       the csh(1).

     !! [_c_o_m_m_a_n_d]
	       Execute a single command in a subshell on the local system.  If
	       ccoommmmaanndd is ommitted, then an interactive subshell is invoked.

     ssttaattuuss    Show the current status of tteellnneett.  This includes the peer one
	       is connected to, as well as the current mode.

     ?? [_c_o_m_m_a_n_d]
	       Get help.  With no arguments, tteellnneett prints a help summary.  If
	       a command is specified, tteellnneett will print the help information
	       for just that command.

EENNVVIIRROONNMMEENNTT
     TTeellnneett uses at least the HOME, SHELL, DISPLAY, and TERM environent vari-
     ables.  Other envirnoment variables may be propogated to the other side
     via the TELNET ENVIRON option.

FFIILLEESS
     ~/._t_e_l_n_e_t_r_c   user customized telnet startup values


HHIISSTTOORRYY
     TTeellnneett appeared in 4.2 BSD.

NNOOTTEESS
     On some remote systems, echo has to be turned off manually when in ``old
     line by line'' mode.

     In ``old line by line'' mode or LINEMODE the terminal's eeooff character is
     only recognized (and sent to the remote system) when it is the first
     character on a line.