home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / archives / ckl196.zip / telnet.txt < prev   
Text File  |  2000-01-02  |  28KB  |  715 lines

  1. CHANGES TO TELNET FUNCTIONALITY FOR C-KERMIT 7.0 AND KERMIT 95 1.1.18
  2.  
  3.   Jeffrey Altman
  4.   The Kermit Project
  5.   Columbia University
  6.  
  7. Most recent update: Fri Dec 31 14:20:57 1999
  8.  
  9.  
  10. CONTENTS
  11.  
  12.   1. INTRODUCTION
  13.   2. SUPPORTED TELNET OPTIONS
  14.   3. TELNET OPTION MANAGEMENT
  15.   4. TELNET COMMAND SUMMARY
  16.   5. DIAGNOSING AND FIXING PROBLEMS
  17.  
  18.  
  19. 1. INTRODUCTION
  20.  
  21. Not so long ago the requirements for a Telnet client were fairly minimal:
  22. support echo management, window size notification, terminal type negotiation,
  23. and perhaps some environment variables.  None of the negotiations were
  24. time-sensitive and none were required in any particular order.  Everyone was
  25. happy as long as the specifications were followed and infinite negotiation
  26. loops were avoided.
  27.  
  28. Then came the advanced telnet options that began to provide for mutual
  29. authentication, data encryption, transport layer security, and
  30. synchronization of remote processes.  These make the original Telnet paradigm
  31. seem extremely simple by comparison.  The new Telnet protocols have order and
  32. timing dependencies that require increased sophistication from both client
  33. and server.
  34.  
  35. Prior to C-Kermit 7.0 and K95 1.1.18, Kermit implemented Telnet protocol by
  36. opening a connection to the host and then transmitting the options that it
  37. supported.  What happened next was determined by how the connection was being
  38. used.  If the user told Kermit to:
  39.  
  40.   TELNET <host>
  41.  
  42. then, immediately after the telnet options were transmitted, the terminal
  43. emulator started and began reading the incoming data.  The rest of the Telnet
  44. protocol implementation was purely reactive (with minor exceptions such as
  45. window-size changes): when a Telnet option was received it would be processed
  46. and a response sent if necessary.
  47.  
  48. However, if the user said:
  49.  
  50.   SET HOST <host>
  51.  
  52. then, after the telnet options were transmitted, Kermit would wait for the
  53. next command from the user.  If a CONNECT command was next the behavior would
  54. be the same as for TELNET <host>.  However, if the script was made up of a
  55. series of INPUT and OUTPUT commands the incoming telnet option negotiations
  56. would be processed while waiting for INPUT.
  57.  
  58. This was adequate when there were no ordering or timing requirements for the
  59. Telnet negotiations.  But with the introduction of authentication,
  60. encryption, transport layer security, and the Kermit option for managing the
  61. states of the Kermit server on both the workstation and host (see iksd.txt)
  62. it is necessary for Telnet negotiations to take place before the TELNET
  63. command enters the terminal emulator or the SET HOST command completes and
  64. allows any subsequent INPUT and OUTPUT commands to execute.
  65.  
  66. The new timing requirements are as follows:
  67.  
  68.  . START_TLS (Transport Layer Security) must be negotiated or refused before
  69.    any other option.
  70.  
  71.  . AUTH (Authentication) must be negotiated or refused before ENCRYPT.
  72.  
  73.  . ENCRYPT (Encryption) must be negotiated/refused in both directions before
  74.    it is safe to transmit any data that might be considered private, including
  75.    Telnet options such as terminal type, location, xdisplay, or environment
  76.    variables.
  77.  
  78.  . KERMIT (Internet Kermit Service) must wait for a response to any request
  79.    for the peer to either turn on or off the Kermit Server capabilities in
  80.    order to facilitate automatic uploading or downloading of files or
  81.    processing of remote commands.
  82.  
  83. The result is that Kermit must now, to the best of its ability, attempt to
  84. process all of the above options before TELNET enters connect mode or SET
  85. HOST completes to process the next command.  It may therefore appear that
  86. Kermit is taking longer to make a connection to a host because it does take
  87. longer for the CONNECT mode to be entered or for the first script command to
  88. be executed.
  89.  
  90. 2. SUPPORTED TELNET OPTIONS
  91.  
  92. BINARY (Binary Transmission Mode)
  93. ECHO (Echo Mode)
  94. SUPPRESS GO AHEAD (Suppress Go Ahead commands)
  95. SEND LOCATION (Send Terminal Location)
  96. TERMINAL TYPE (Negotiate Terminal Type)
  97. NAWS (Negotiate About Window Size)
  98. XDISPLOC
  99. AUTHENTICATION
  100. ENCRYPTION
  101. NEW ENVIRONMENT
  102. START TLS
  103. KERMIT
  104. FORWARD X
  105.  
  106. 3. TELNET OPTION MANAGEMENT
  107.  
  108. One of the benefits of processing all the Telnet options during the SET
  109. HOST/TELNET command is that it is now possible to set policy requirements for
  110. a valid connection.  This is especially true when the connection must be
  111. authenticated and encrypted or else fail.  This is done with the new command:
  112.  
  113.   SET TELOPT [ <switch> ] <option> <mode> [ <mode> ]
  114.  
  115. Some options, such as terminal type and window size, are negotiated in one
  116. direction and others, such as binary, encryption and kermit. are negotiated
  117. separately in each direction.  For each option, the mode can be set to:
  118.  
  119. ACCEPTED
  120.   Kermit does not offer the option but if the peer requests it
  121.   Kermit agrees to use it.
  122.  
  123. REFUSED
  124.   Kermit does not offer the option and if the peer requests it
  125.   Kermit refuses to use it.
  126.  
  127. REQUESTED
  128.   Kermit requests the option but agrees not to use it if the peer
  129.   refuses it.
  130.  
  131. REQUIRED
  132.   Kermit requests the option and terminates the connection if
  133.   the peer refuses it.
  134.  
  135. The optional <switch> can be:
  136.  
  137. /CLIENT
  138.   Specifies that the command is being used to set the configuration
  139.   for when Kermit is the Telnet client.  This is the default if no
  140.   switch is specified.
  141.  
  142. /SERVER
  143.   Specifies that the command is being used to set the configuration
  144.   for when Kermit is the Telnet server (accepts incoming
  145.   connections.)
  146.  
  147. The options that can be configured and their default settings, as viewed by
  148. SHOW TELOPT, are:
  149.  
  150.        Telnet Option  Me (client)   U (client)  Me (server)   U (server)
  151.               BINARY     ACCEPTED     ACCEPTED     ACCEPTED     ACCEPTED
  152.                              WONT         WONT
  153.                 ECHO      REFUSED     ACCEPTED    REQUESTED      REFUSED
  154.                              WONT         WILL
  155.    SUPPRESS-GO-AHEAD     ACCEPTED     ACCEPTED    REQUESTED    REQUESTED
  156.                              WONT         WILL
  157.        SEND-LOCATION      REFUSED      REFUSED      REFUSED      REFUSED
  158.                              WONT         WONT
  159.        TERMINAL-TYPE    REQUESTED      REFUSED      REFUSED    REQUESTED
  160.                              WILL         WONT
  161.                 NAWS    REQUESTED      REFUSED      REFUSED    REQUESTED
  162.                              WILL         WONT
  163.             XDISPLOC      REFUSED      REFUSED      REFUSED      REFUSED
  164.                              WONT         WONT
  165.       AUTHENTICATION    REQUESTED      REFUSED      REFUSED    REQUESTED
  166.                              WILL         WONT
  167.           ENCRYPTION    REQUESTED    REQUESTED    REQUESTED    REQUESTED
  168.                              WILL         WILL
  169.      NEW-ENVIRONMENT    REQUESTED      REFUSED      REFUSED    REQUESTED
  170.                              WILL         WONT
  171.            start-tls     ACCEPTED      REFUSED      REFUSED    REQUESTED
  172.                              WONT         WONT
  173.               kermit    REQUESTED    REQUESTED    REQUESTED    REQUESTED
  174.                              WONT         WONT
  175.            forward-X      REFUSED    REQUESTED      REFUSED      REFUSED
  176.                              WONT         WONT
  177.  
  178. The second line listed for each option shows the currently negotiated state
  179. of the option for the current connection.
  180.  
  181. The SET TELOPT command should be used instead of the older commands:
  182.  
  183.   SET TELNET AUTHENTICATION { ACCEPTED, REFUSED, REQUESTED, REQUIRED }
  184.   SET TELNET BINARY-MODE    { ACCEPTED, REFUSED, REQUESTED, REQUIRED }
  185.   SET TELNET ENCRYPTION     { ACCEPTED, REFUSED, REQUESTED, REQUIRED }
  186.   SET TELNET ENVIRONMENT    { ON, OFF }
  187.   SET TELNET NAWS           { ACCEPTED, REFUSED, REQUESTED, REQUIRED }
  188.   SET TELNET XDISPLAY-LOC   { ACCEPTED, REFUSED, REQUESTED, REQUIRED }
  189.  
  190. which are now considered obsolete (but still supported).
  191.  
  192.  
  193. 4. TELNET COMMAND SUMMARY
  194.  
  195. TELNET /AUTH:<type> /ENCRYPT:<type> /USERID:<name> /PASSWORD:<string>
  196.        <host> <port>
  197.   The TELNET command is a shortcut for making interactive connections.
  198.   It is the equivalent of specifying:
  199.  
  200.     SET TELOPT AUTH ...
  201.     SET TELNET AUTH TYPE ...
  202.     SET TELOPT ENCRYPT ...
  203.     SET TELNET ENCRYPT TYPE ...
  204.     SET LOGIN USERID ...
  205.     SET LOGIN PASSWORD ...
  206.     SET HOST /CONNECT <host> <port> /TELNET
  207.  
  208.   /AUTH:<type> is equivalent to SET TELNET AUTH TYPE <type> and
  209.   SET TELOPT AUTH REQUIRED with the following exceptions.  If the type
  210.   is AUTO, then SET TELOPT AUTH REQUESTED is executed and if the type
  211.   is NONE, then SET TELOPT AUTH REFUSED is executed.
  212.  
  213.   /ENCRYPT:<type> is equivalent to SET TELNET ENCRYPT TYPE <type>
  214.   and SET TELOPT ENCRYPT REQUIRED REQUIRED with the following exceptions.
  215.   If the type is AUTO then SET TELOPT AUTH REQUESTED REQUESTED is executed
  216.   and if the type is NONE then SET TELOPT ENCRYPT REFUSED REFUSED is
  217.   executed.
  218.  
  219.   /USERID:[<name>]
  220.   This switch is equivalent to SET LOGIN USERID <name> or SET TELNET
  221.   ENVIRONMENT USER <name>.  If a string is given, it sent to host during
  222.   Telnet negotiations; if this switch is given but the string is omitted, no
  223.   user ID is sent to the host.  If this switch is not given, your current
  224.   USERID value, \v(userid), is sent.  When a userid is sent to the host
  225.   it is a request to login as the specified user.
  226.  
  227.   /PASSWORD:[<string>]
  228.   This switch is equivalent to SET LOGIN PASSWORD.  If a string is given,
  229.   it is treated as the password to be used (if required) by any Telnet
  230.   Authentication protocol (Kerberos Ticket retrieval, Secure Remote
  231.   Password, or X.509 certificate private key decryption.)  If no password
  232.   switch is specified a prompt is issued to request the password if one
  233.   is required for the negotiated authentication method.
  234.  
  235. For TCP/IP TELNET connections, which are in NVT (ASCII) mode by default:
  236.  
  237. SET LOGIN USERID <name>
  238.   If a <name> is given, it sent to host during Telnet negotiations; if this
  239.   switch is given but the string is omitted, no user ID is sent to the host.
  240.   If this command is not given, your current USERID value, \v(userid), is
  241.   sent.  When a userid is sent to the host it is a request to login as the
  242.   specified user.
  243.  
  244. SET LOGIN PASSWORD <password>
  245.   If a <password> is given, it is treated as the password to be used (if
  246.   required) by any Telnet Authentication protocol (Kerberos Ticket retrieval,
  247.   Secure Remote Password (SRP), or X.509 certificate private key decryption.)
  248.   If no password is specified a prompt is issued to request the password if
  249.   one is required for the negotiated authentication method.
  250.  
  251. SET TELNET AUTHENTICATION TYPE { AUTOMATIC, KERBEROS_IV, KERBEROS_V,
  252.   NTLM, SSL, SRP, NONE } [ { ... } ... ]
  253.   AUTOMATIC allows the host to choose the preferred type of authentication.
  254.   Other values allow a specific authentication method to be used.  AUTOMATIC
  255.   is the default.  Available options can vary depending on configuration;
  256.   type SET TELNET AUTHENTICATION TYPE ? for a list.
  257.  
  258.   When the type is AUTOMATIC and Kermit is accepting incoming connections
  259.   the supported authentication methods will be offered in the following
  260.   order:
  261.  
  262.     NTLM (windows only)
  263.     Kerberos 5
  264.     Kerberos 4
  265.     Secure Remote Password
  266.     SSL
  267.  
  268.   This is the equivalent of the command:
  269.  
  270.     SET TELNET AUTH TYPE NTLM KRB5 KRB4 SRP SSL
  271.  
  272. SET TELNET AUTHENTICATION FORWARDING { ON, OFF }
  273.   Set this to ON to forward Kerberos V ticket-granting-tickets to the host
  274.   after authentication is complete.  OFF by default.
  275.  
  276. SET TELNET AUTHENTICATION ENCRYPT-FLAG { ANY, NONE, TELOPT }
  277.   Use this command to specify which AUTH telopt encryption flags may be
  278.   accepted in client mode or offered in server mode.  The default is ANY.
  279.  
  280. SET TELNET AUTHENTICATION HOW-FLAG { ANY, ONE-WAY, MUTUAL }
  281.   Use this command to specify which AUTH telopt how flags may be
  282.   accepted in client mode or offered in server mode.  The default is ANY.
  283.  
  284. SET TELNET BUG BINARY-ME-MEANS-U-TOO { ON, OFF }
  285.   Set this to ON to try to overcome TELNET binary-mode misnegotiations by
  286.   C-Kermit's TELNET partner.
  287.  
  288. SET TELNET BUG BINARY-U-MEANS-ME-TOO { ON, OFF }
  289.   Set this to ON to try to overcome TELNET binary-mode misnegotiations by
  290.   C-Kermit's TELNET partner.
  291.  
  292. SET TELNET BUG INFINITE-LOOP-CHECK { ON, OFF }
  293.   Set this to ON to prevent Kermit from responding to a telnet negotiation
  294.   sequence that enters an infinite loop.  The default is OFF because this
  295.   should never occur.
  296.  
  297. SET TELNET BUG SB-IMPLIES-WILL-DO { ON, OFF }
  298.   Set this to ON to allow Kermit to respond to telnet sub-negotiations if
  299.   the peer forgets to respond to WILL with DO or to DO with WILL before
  300.   sending a SB (subnegotiation).
  301.  
  302. SET TELNET DEBUG ON
  303.   Displays all TELNET negotiations in full detail.
  304.  
  305. SET TELNET ECHO { LOCAL, REMOTE }
  306.   C-Kermit's initial echoing state for TELNET connections, LOCAL by default.
  307.   After the connection is made, TELNET negotiations determine the echoing.
  308.  
  309. SET TELNET ENCRYPTION TYPE { AUTOMATIC, CAST128_CFB64, CAST128_OFB64,
  310.   CAST5_40_CFB64, CAST5_40_OFB64, DES_CFB64, DES_OFB64,
  311.   DES3_CFB64, DES3_OFB64, NONE }
  312.   AUTOMATIC allows the host to choose the preferred type of encryption.
  313.   Other values allow a specific encryption method to be specified.
  314.   AUTOMATIC is the default.  The list of options will vary depending
  315.   on the encryption types selected at compilation time.
  316.  
  317.   When the type is AUTOMATIC and Kermit is accepting incoming connections
  318.   the supported encryption methods will be offered in the following order:
  319.  
  320.     DES3_CFB64
  321.     CAST128_CFB64
  322.     DES_CFB64
  323.     CAST5_40_CFB64
  324.     DES3_OFB64
  325.     CAST128_OFB64
  326.     DES_OFB64
  327.     CAST5_40_OFB64
  328.  
  329. SET TELNET ENVIRONMENT { variable-name [ value ] }
  330.   This feature lets Kermit send the values of certain environment variables
  331.   to the other computer if it asks for them.  The variable-name can be any
  332.   of the "well-known" variables "USER", "JOB", "ACCT", "PRINTER",
  333.   "SYSTEMTYPE", or "DISPLAY".  The default values are taken from your
  334.   environment; use this command to change or remove them.
  335.  
  336.   The most commonly used variables and their default values are:
  337.  
  338.   USER:
  339.     Telnet servers that request this value will use it as the name of the
  340.     account to be accessed and will therefore not prompt you for a username.
  341.     If a password is required to access the specified user's account only
  342.     the password prompt will be issued.  The default value is the name of
  343.     the user on the local machine.  This value may also be set with the
  344.     command SET LOGIN USER <name>.
  345.  
  346.   DISPLAY:
  347.     This variable is used to specify the location of the X Windows Server
  348.     to be used by X Windows client applications executed on the remote host.
  349.     This value is used by three telnet options: ENVIRONMENT, XDISPLOC, and
  350.     FORWARD-X.  The default value is retrieved from the value of the DISPLAY
  351.     environment variable in the local environment.
  352.  
  353.   PRINTER:
  354.     This variable is used to specify the location of the LPR printer to be
  355.     used for printing files on the host.  This variable is not set by
  356.     default.
  357.  
  358.   SYSTEM:
  359.     This variable is used to specify the operating system type of the local
  360.     machine.  The default value is determined by Kermit.  Typical values
  361.     are "UNIX", "VMS", "WIN32", and "OS2".
  362.  
  363.   See RFC1572 for further details.
  364.  
  365. SET TELNET LOCATION [ text ]
  366.   Location string to send to the Telnet server if it asks.  By default this
  367.   is picked up from the LOCATION environment variable.  Give this command
  368.   with no text to disable this feature.
  369.  
  370. SET TELNET NEWLINE-MODE { NVT, BINARY-MODE } { OFF, ON, RAW }
  371.   Determines how carriage returns are handled on TELNET connections.
  372.   There are separate settings for NVT (ASCII) mode and binary mode.
  373.   ON (default for NVT mode) means CRLF represents CR.
  374.   OFF means CR followed by NUL represents CR.
  375.   RAW (default for BINARY mode) means CR stands for itself.
  376.  
  377. SET TELNET PROMPT-FOR-USERID <prompt>
  378.   Specifies a custom prompt to be used when prompting for a userid.
  379.   Kermit will prompt for a userid if
  380.     SET LOGIN USERID {}
  381.   has been issued prior to a telnet authentication negotiation for
  382.   an authentication type that requires the transmission of a name.
  383.   (e.g. Secure Remote Password).
  384.  
  385. SET TELNET REMOTE-ECHO { ON, OFF }
  386.   Applies only to incoming connections created with:
  387.     SET HOST * <port> /TELNET
  388.   This command determines whether Kermit will actually echo characters
  389.   received from the remote when it has negotiated to do so.  The default
  390.   is ON.  Remote echoing may be turned off when it is necessary to read
  391.   a password with the INPUT command.
  392.  
  393. SET TELNET TERMINAL-TYPE name
  394.   The terminal type to send to the remote TELNET host.  If none is given,
  395.   your current SET TERMINAL TYPE value is sent, e.g. VT220.
  396.  
  397. SET TELNET TRANSFER-MODE { ON, OFF }
  398.   When ON (OFF by default) and BINARY negotiations are not REFUSED Kermit
  399.   will attempt to negotiate BINARY mode in each direction before the start
  400.   of each file transfer.  After the transfer is complete BINARY mode will
  401.   be restored to the pre-transfer state.
  402.  
  403. SET TELNET WAIT-FOR-NEGOTIATIONS { ON, OFF }
  404.   Each Telnet option must be fully negotiated either On or Off before the
  405.   session can continue.  This is especially true with options that require
  406.   subnegotiations such as Authentication, Encryption, and Kermit; for
  407.   proper support of these options Kermit must wait for the negotiations to
  408.   complete.  Of course, Kermit has no way of knowing whether a reply is
  409.   delayed or not coming at all, and so will wait forever before continuing
  410.   the session.  If you know that Kermit's Telnet partner will not be sending
  411.   the required replies, you should instruct Kermit to REFUSE specific
  412.   options with the SET TELOPT command.  If you do not know which command
  413.   the host is not responding to set this option of OFF.
  414.  
  415.  
  416. 5. DIAGNOSING AND FIXING PROBLEMS
  417.  
  418. After we replaced the Telnet engine and added support for the new
  419. functionality we found many Telnet servers that do not adhere to the Telnet
  420. protocol as described in the IETF RFCs.  Here are some of the most common
  421. bugs and the workarounds that Kermit provides the user to avoid them.
  422.  
  423. BUG: Telnet Server does not respond to telnet options it does not recognize.
  424.  
  425. Description:
  426.   The telnet protocol requires that all initial requests for action (WILL or
  427.   DO) must be responded to either in the affirmative (DO or WILL) or in the
  428.   negative (DONT or WONT).  A negative response is required for all
  429.   unrecognized options.  A failure to respond to a Telnet option may result
  430.   in the peer waiting forever.
  431.  
  432. Symptom:
  433.  
  434.   Kermit connects to the host, waits two minutes, and then reports a telnet
  435.   protocol error followed by the list of outstanding negotiations.  Kermit
  436.   has sent a Telnet option such as WILL AUTH and is waiting for the required
  437.   response which never comes.  In C-Kermit you will see "Negotiations...."
  438.   with many dots.  In K95 you will see the "spinner" twirl.
  439.  
  440.   Example:
  441.  
  442.   DNS Lookup...  Trying xxx.xxx.xxx.xxx...  Reverse DNS Lookup... (OK)
  443.   Negotiations... ?Telnet Protocol Timeout
  444.   ?Telnet waiting for response to WILL TERMINAL-TYPE
  445.   ?Telnet waiting for response to WILL NAWS
  446.   ?Telnet waiting for response to WILL AUTHENTICATION
  447.   ?Telnet waiting for response to WILL NEW-ENVIRONMENT
  448.  
  449.   **** AOS/VS II  Release 2.20.00.39 / Press NEW-LINE to begin logging on ****
  450.  
  451.   Too slow - input timed out
  452.  
  453. Workaround:
  454.  
  455.   For each of the telnet options listed as missing a response issue a
  456.  
  457.     SET TELOPT <option> REFUSED [REFUSED]
  458.  
  459.   command.  For instance:
  460.  
  461.     SET TELOPT TERMINAL-TYPE REFUSED
  462.     SET TELOPT NAWS REFUSED
  463.     SET TELOPT AUTHENTICATION REFUSED
  464.     SET TELOPT NEW-ENVIRONMENT REFUSED
  465.  
  466. BUG: Server sends a subnegotiation without negotiating the option
  467.  
  468. Description:
  469.   The telnet protocol requires that subnegotiations not be sent until the
  470.   peers have agreed to WILL or DO the specified option.  All subnegotiations
  471.   received in a WONT or DONT state are to be ignored.
  472.  
  473. Symptom:
  474.   There are two possibilities.  In the first, the host sends a subnegotiation
  475.   such as
  476.  
  477.      IAC SB TERM_TYPE SEND IAC SE
  478.  
  479.   without Kermit attempting to use the telnet option.
  480.  
  481.      IAC WILL TERM_TYPE
  482.      IAC DO TERM_TYPE
  483.  
  484.   In this case the subnegotiation request will be ignored and the
  485.   subnegotiation response
  486.  
  487.      IAC SB TERM_TYPE IS <type> IAC SE
  488.  
  489.   will not be sent.  How this affects the sender of the illegal subnegotation
  490.   is unknown.
  491.  
  492.   In the second scenario, Kermit sends
  493.  
  494.      IAC WILL TERM_TYPE
  495.  
  496.   but the host sends the subnegotiation without responding to the request with
  497.  
  498.      IAC DO TERM_TYPE
  499.  
  500.   This scenario degenerates into the previous bug.  (See "Telnet Server does
  501.   not respond to telnet options it does not recognize.")
  502.  
  503. Workaround:
  504.   For the first scenario, there is nothing that can be done.  Kermit is
  505.   already ignoring the subnegotiations and there is nothing that Kermit
  506.   can do to force the host to adhere to the protocol.  If you have a
  507.   support contract with the maker of the Telnet Server, file a report.
  508.  
  509.   For the second scenario, Kermit implements a workaround which is on by
  510.   default:
  511.  
  512.     SET TELNET BUG SB-IMPLIES-WILL-DO ON
  513.  
  514.   This causes Kermit to treat
  515.  
  516.      IAC SB TERM_TYPE SEND IAC SE
  517.  
  518.   as if it were
  519.  
  520.      IAC WILL TERM_TYPE
  521.      IAC SB TERM_TYPE SEND IAC SE
  522.  
  523.  
  524. BUG: Server sends DO TERM_TYPE but then never asks for the terminal type.
  525.  
  526. Description:
  527.   Although it is not required by the Telnet Terminal-Type RFC, it makes
  528.   sense that if a server asks the client to negotiate the terminal
  529.   type, that it will actually go through with the negotiation.
  530.  
  531. Symptom:
  532.   Kermit reports that Terminal Type negotiation is in use but the terminal
  533.   type is not configured properly on the host.
  534.  
  535. Workaround:
  536.   There isn't much that can be done other than to instruct Kermit to:
  537.  
  538.      SET TELOPT TERMINAL-TYPE REFUSE
  539.  
  540.   so that it doesn't appear to the user that the terminal type has
  541.   indeed been negotiated.
  542.  
  543. BUG: Server negotiates BINARY mode in one direction but uses it in both.
  544.  
  545. Description:
  546.   When either the client or the server says it WILL BINARY and the peer
  547.   accepts, it is an indication that CR is to be sent without a following
  548.   NUL or LF by the sender of WILL BINARY.  A misunderstanding about the
  549.   meaning of this negotiation can prevent files from being transfered as
  550.   the packet lengths and checksums will not match.
  551.  
  552. Symptom:
  553.   File transfers fail, reporting checksum or packet length errors.
  554.  
  555. Workaround:
  556.   Use SET TERMINAL DEBUG ON to determine which direction the host is
  557.   negotiating BINARY mode in.
  558.  
  559.   Then use either:
  560.  
  561.     SET TELNET BUG BINARY-ME-MEANS-U-TOO ON
  562.  
  563.   or:
  564.  
  565.     SET TELNET BUG BINARY-U-MEANS-ME-TOO ON
  566.  
  567.   to instruct Kermit to follow the broken behavior.
  568.  
  569.  
  570. PROBLEM: A connection is made to the Telnet Server but then it takes 30 to 60
  571.   seconds for a login prompt, or disconnects without displaying a prompt.
  572.  
  573. Description:
  574.   The host is trying to resolve a host name for the IP Address assigned to
  575.   your computer and is unable to.  Check with your network administrator
  576.   or ISP to make sure that the IP address you are using has a valid DNS
  577.   entry for reverse lookups (IP address to name).
  578.  
  579.  
  580. PROBLEM: The Telnet Server does not display a "login:" or "Username:" prompt
  581.   and instead immediately displays the "Password:" prompt.
  582.  
  583. Description:
  584.   The server you are connecting to supports the Telnet environment option
  585.   and has been given your username on the workstation during the telnet
  586.   option negotiations.
  587.  
  588. Workaround:
  589.   If your username on the workstation is not the same as the username
  590.   on the host, or if you are using a script that requires a username
  591.   or login prompt, use the command:
  592.  
  593.     SET TELNET ENVIRONMENT USER {<username>}
  594.  
  595.   or:
  596.  
  597.     SET LOGIN USERID {<username>}
  598.  
  599.   to specify your name on the host; or disable this option with:
  600.  
  601.     SET TELOPT NEW-ENVIRONMENT REFUSED
  602.  
  603.  
  604. BUG: The host echos input but never negotiates WILL ECHO.
  605.  
  606. Description:
  607.   The Telnet protocol requires that all Telnet options be in a state of I
  608.   DONT and you WONT until otherwise negotiated.  That means that unless a
  609.   host says WILL ECHO it should not echo data; the client should echo it
  610.   locally.
  611.  
  612. Symptom:
  613.   Failure to follow the protocol definition can result in no echoing or
  614.   double echoing.  This kind of confusion has been seen with two
  615.   well-known sites:
  616.  
  617.     The USA Library of Congress
  618.     Dow Jones News Retrieval
  619.  
  620. Workaround:
  621.   SET TELNET ECHO REMOTE
  622.   SET TELOPT ECHO REFUSE
  623.  
  624.  
  625. BUG: BSDI BSD/OS 3.1 Telnetd improperly implements WILL BINARY mode.
  626.  
  627. Description:
  628.   The BSDI telnetd when it negotiaties WILL BINARY (host to client) binary
  629.   mode refuses to transmit CR control characters.  The man page for telnetd
  630.   states, "Binary mode has no common interpretation except between similar
  631.   operating systems (Unix in this case)."  The implementors clearly have
  632.   misread RFC-856 (TELNET BINARY TRANSMISSION) which clearly states that
  633.   the only affect that BINARY mode has on the channel is to disable NVT
  634.   (network virtual terminal) handling of CR (CR no longer must be followed
  635.   by NUL if it is not followed by LF) and that the 8th data bit must not
  636.   be stripped.
  637.  
  638. Symptom:
  639.   By refusing to transmit CR control characters and translate them to LF
  640.   the BSDI telnetd causes end of lines to be misinterpreted by the
  641.   terminal and for file transfers to become corrupted if the host is
  642.   allowed to negotiate WILL BINARY.
  643.  
  644. Workaround:
  645.   SET TELOPT BINARY ACCEPT REFUSE
  646.  
  647.  
  648. PROBLEM:  The host supports Telnet AUTH but you wish to login manually
  649.  
  650. Description:
  651.   You are using Kermit to connect to a host that supports Telnet
  652.   Authentication except you need to login manually for one of the
  653.   following reasons:
  654.  
  655.   . You do not have credentials that match the supported Telnet AUTH
  656.     type.  For example, the host supports Kerberos 5 but you do not
  657.     have a principal defined in the Kerberos realm even though you
  658.     have a valid account on the host.
  659.  
  660.   . You wish to login to an Internet Kermit Service anonymously.
  661.  
  662. Workaround:
  663.     SET TELOPT AUTH REFUSE
  664.  
  665.  
  666. PROBLEM:  Applications on the host are unable to open the DISPLAY
  667.  
  668. Description:
  669.   Some applications such as the editor 'emacs' are dual mode.  They execute
  670.   either in terminal mode or as an X Windows client.  If the application
  671.   terminates with an error that it is unable to open the DISPLAY it could
  672.   be for one of the following reasons:
  673.  
  674.   . a DISPLAY environment variable is defined in the shell's script that is
  675.     executed at login and it points to an invalid value;
  676.  
  677.   . there is a DISPLAY environment variable defined on the local machine
  678.     which has been forwarded to the host by Kermit and the specified
  679.     DISPLAY is unreachable.
  680.  
  681.   . a SET TELNET ENVIRONMENT DISPLAY command was issued prior to connecting
  682.     to the host and the specified DISPLAY value is invalid.
  683.  
  684. Workaround:
  685.   If you wish to use the application as an X Windows client you must
  686.   have a working X Windows Server running on your local machine and specify
  687.   a valid DISPLAY string for your server.  This can either be specified on
  688.   the host via
  689.  
  690.      export DISPLAY=<host>:<display>[.<screen>]
  691.  
  692.   or by specifying the display in Kermit with the command
  693.  
  694.      SET TELNET ENVIRONMENT DISPLAY [<host>:]<display>[.<screen>]
  695.  
  696.   If your telnet server supports any of the following telnet options:
  697.  
  698.      . X-Display Location
  699.      . Environment Variables
  700.      . X-Windows Forwarding
  701.  
  702.   then Kermit will transmit the DISPLAY value to the host during the initial
  703.   telnet negotiations.
  704.  
  705.   If you wish to use the application in terminal mode you can prevent Kermit
  706.   from transmitting the local DISPLAY value to the host by issuing the
  707.   following commands:
  708.  
  709.      SET TELOPT XDISPLOC REFUSE
  710.      SET TELOPT FORWARD-X REFUSE
  711.      SET TELNET ENVIRONMENT DISPLAY
  712.  
  713.  
  714. (End of TELNET.TXT)
  715.