RFC 1416 EXPERIMENTAL TELNET · AUTHENTICATION · SECURITY

Telnet auth: Telnet Authentication Option

A way to prove your identity over Telnet without sending passwords in the clear

On rfc-editor.org ↗
PUBLISHED
February 1993
AUTHORS
D. Borman
STREAM
Legacy
BUILDS ON
RFC 1409 — Telnet auth
OBSOLETED BY
RFC 2941 — Telnet Authentication
AUTHENTICATION TYPES DEFINED
6: NULL, KERBEROS_V4, KERBEROS_V5, SPX, RSA, LOKI
NEGOTIATION DIRECTION
One-way: server sends DO, client sends WILL
DEFAULT BEHAVIOR
WONT AUTHENTICATION, DONT AUTHENTICATION (no authentication)
DOI
10.17487/RFC1416

RFC text

Contents
Original text · RFC Editor View on rfc-editor.org ↗
Network Working Group                                  D. Borman, Editor
Request for Comments: 1416                           Cray Research, Inc.
Obsoletes: 1409                                            February 1993


                      Telnet Authentication Option

Status of this Memo

   This memo defines an Experimental Protocol for the Internet
   community.  Discussion and suggestions for improvement are requested.
   Please refer to the current edition of the "IAB Official Protocol
   Standards" for the standardization state and status of this protocol.
   Distribution of this memo is unlimited.

Note

   This RFC 1416 replaces RFC 1409, which has an important typographical
   error in the example on page 6 (one occurance of "REPLY" should be
   "IS").

1.  Command Names and Codes

   AUTHENTICATION  37
       IS               0
       SEND             1
       REPLY            2
       NAME             3

       Authentication Types
       NULL             0
       KERBEROS_V4      1
       KERBEROS_V5      2
       SPX              3
       RSA              6
       LOKI            10

       Modifiers
       AUTH_WHO_MASK        1
       AUTH_CLIENT_TO_SERVER    0
       AUTH_SERVER_TO_CLIENT    1
       AUTH_HOW_MASK        2
       AUTH_HOW_ONE_WAY         0
       AUTH_HOW_MUTUAL          2

2.  Command Meanings

   This document makes reference to a "server" and a "client".  For the
   purposes of this document, the "server" is the side of the connection
   that did the passive TCP open (TCP LISTEN state), and the "client" is
   the side of the connection that did the active open.

   IAC WILL AUTHENTICATION

      The client side of the connection sends this command to indicate
      that it is willing to send and receive authentication information.

   IAC DO AUTHENTICATION

      The servers side of the connection sends this command to indicate
      that it is willing to send and receive authentication information.

   IAC WONT AUTHENTICATION

      The client side of the connection sends this command to indicate
      that it refuses to send or receive authentication information; the
      server side sends this command if it receives a DO AUTHENTICATION
      command.

   IAC DONT AUTHENTICATION

      The server side of the connection sends this command to indicate
      that it refuses to send or receive authentication information; the
      client side sends this command if it receives a WILL
      AUTHENTICATION command.

   IAC SB AUTHENTICATION SEND authentication-type-pair-list IAC SE

      The sender of this command (the server) requests that the remote
      side send authentication information for one of the authentication
      types listed in "authentication-type-pair-list".  The
      "authentication-type-pair-list" is an ordered list of
      "authentication-type" pairs.  Only the server side (DO
      AUTHENTICATION) is allowed to send this.

   IAC SB AUTHENTICATION IS authentication-type-pair <auth data> IAC SE

      The sender of this command (the client) is sending the
      authentication information for authentication type
      "authentication-type-pair".  Only the client side (WILL
      AUTHENTICATION) is allowed to send this.

   IAC SB AUTHENTICATION REPLY authentication-type-pair <auth data> IAC
   SE

      The sender of this command (the server) is sending a reply to the
      the authentication information received in a previous IS command.
      Only the server side (DO AUTHENTICATION) is allowed to send this.

   IAC SB AUTHENTICATION NAME remote-user IAC SE

      This optional command is sent to specify the account name on the
      remote host that the user wishes to be authorized to use.  Note
      that authentication may succeed, and the authorization to use a
      particular account may still fail.  Some authentication mechanisms
      may ignore this command.

   The "authentication-type-pair" is two octets, the first is the
   authentication type (as listed in Section 1, additions to this list
   must be registered with the Internet Assigned Numbers Authority
   (IANA)), and the second is a modifier to the type.  There are
   currently two one bit fields defined in the modifier, the
   AUTH_WHO_MASK bit and the AUTH_HOW_MASK bit, so there are four
   possible combinations:

      AUTH_CLIENT_TO_SERVER
      AUTH_HOW_ONE_WAY

         The client will send authentication information about the local
         user to the server.  If the negotiation is successful, the
         server will have authenticated the user on the client side of
         the connection.

      AUTH_SERVER_TO_CLIENT
      AUTH_HOW_ONE_WAY

         The server will authenticate itself to the client.  If the
         negotiation is successful, the client will know that it is
         connected to the server that it wants to be connected to.

      AUTH_CLIENT_TO_SERVER
      AUTH_HOW_MUTUAL

         The client will send authentication information about the local
         user to the server, and then the server will authenticate
         itself to the client.  If the negotiation is successful, the
         server will have authenticated the user on the client side of
         the connection, and the client will know that it is connected
         to the server that it wants to be connected to.

      AUTH_SERVER_TO_CLIENT
      AUTH_HOW_MUTUAL

         The server will authenticate itself to the client, and then the
         client will authenticate itself to the server.  If the
         negotiation is successful, the client will know that it is
         connected to the server that it wants to be connected to, and
         the server will know that the client is who it claims to be.

3.  Default Specification

   The default specification for this option is

      WONT AUTHENTICATION
      DONT AUTHENTICATION

   meaning there will not be any exchange of authentication information.

4.  Motivation

   One of the deficiencies of the Telnet protocol is that in order to
   log into remote systems, users have to type their passwords, which
   are passed in clear text through the network.  If the connections
   goes through untrusted networks, there is the possibility that
   passwords will be compromised by someone watching the packets as they
   go by.

   The purpose of the AUTHENTICATION option is to provide a framework
   for the passing of authentication information through the TELNET
   session.  This means that: 1) the users password will not be sent in
   clear text across the network, and 2) if the front end telnet process
   has the appropriate authentication information, it can automatically
   send the information, and the user will not have to type any
   password.

   It is intended that the AUTHENTICATION option be general enough that
   it can be used to pass information for any authentication system.

5.  Security Implications

   The ability to negotiate a common authentication mechanism between
   client and server is a feature of the authentication option that
   should be used with caution.  When the negotiation is performed, no
   authentication has yet occurred.  Therefore, each system has no way
   of knowing whether or not it is talking to the system it intends.  An
   intruder could attempt to negotiate the use of an authentication
   system which is either weak, or already compromised by the intruder.

6.  Implementation Rules

   WILL and DO are used only at the beginning of the connection to
   obtain and grant permission for future negotiations.

   The authentication is only negotiated in one directions; the server
   must send the "DO", and the client must send the "WILL".  This
   restriction is due to the nature of authentication; there are three
   possible cases; server authenticates client, client authenticates
   server, and server and client authenticate each other.  By only
   negotiating the option in one direction, and then determining which
   of the three cases is being used via the suboption, potential
   ambiguity is removed.  If the server receives a "DO", it must respond
   with a "WONT".  If the client receives a "WILL", it must respond with
   a "DONT".

   Once the two hosts have exchanged a DO and a WILL, the server is free
   to request authentication information.  In the request, a list of
   supported authentication types is sent.  Only the server may send
   requests ("IAC SB AUTHENTICATION SEND authentication-type-pair-list
   IAC SE").  Only the client may transmit authentication information
   via the "IAC SB AUTHENTICATION IS authentication-type ... IAC SE"
   command.  Only the server may send replys ("IAC SB AUTHENTICATION
   REPLY authentication-type ... IAC SE").  As many IS and REPLY
   suboptions may be exchanged as are needed for the particular
   authentication scheme chosen.

   If the client does not support any of the authentication types listed
   in the authentication-type-pair-list, a type of NULL should be used
   to indicate this in the IS reply.  Note that in this case, the server
   may choose to close the connection.

   The order of the authentication types MUST be ordered to indicate a
   preference for different authentication types, the first type being
   the most preferred, and the last type the least preferred.

   The following is an example of use of the option:

       Client                           Server
                                        IAC DO AUTHENTICATION
       IAC WILL AUTHENTICATION
       [ The server is now free to request authentication information.
         ]
                                        IAC SB AUTHENTICATION SEND
                                        KERBEROS_V4 CLIENT|MUTUAL
                                        KERBEROS_V4 CLIENT|ONE_WAY IAC
                                        SE
       [ The server has requested mutual Kerberos authentication, but is
         willing to do just one-way Kerberos authentication.  The client
         will now respond with the name of the user that it wants to log
         in as, and the Kerberos ticket.  ]
       IAC SB AUTHENTICATION NAME "joe"
       IAC SE
       IAC SB AUTHENTICATION IS
       KERBEROS_V4 CLIENT|MUTUAL AUTH 4
       7 1 67 82 65 89 46 67 7 9 77 0
       48 24 49 244 109 240 50 208 43
       35 25 116 104 44 167 21 201 224
       229 145 20 2 244 213 220 33 134
       148 4 251 249 233 229 152 77 2
       109 130 231 33 146 190 248 1 9
       31 95 94 15 120 224 0 225 76 205
       70 136 245 190 199 147 155 13
       IAC SE
       [ The server responds with an ACCEPT command to state that the
         authentication was successful.  ]
                                        IAC SB AUTHENTICATION REPLY
                                        KERBEROS_V4 CLIENT|MUTUAL ACCEPT
                                        IAC SE
       [ Next, the client sends across a CHALLENGE to verify that it is
         really talking to the right server.  ]
       IAC SB AUTHENTICATION IS
       KERBEROS_V4 CLIENT|MUTUAL
       CHALLENGE xx xx xx xx xx xx xx
       xx IAC SE
       [ Lastly, the server sends across a RESPONSE to prove that it
         really is the right server.
                                        IAC SB AUTHENTICATION REPLY
                                        KERBEROS_V4 CLIENT|MUTUAL
                                        RESPONSE yy yy yy yy yy yy yy yy
                                        IAC SE

   It is expected that any implementation that supports the Telnet
   AUTHENTICATION option will support all of this specification.

7.  References

   [1] Reynolds, J., and J. Postel, "Assigned Numbers", STD 2, RFC 1340,
       USC/Information Sciences Institute, July 1992.

Security Considerations

   Security issues are discussed in Section 5.

Author's Address

   David A. Borman, Editor
   Cray Research, Inc.
   655F Lone Oak Drive
   Eagan, MN 55123

   Phone: (612) 452-6650
   EMail: dab@CRAY.COM

   Mailing List: telnet-ietf@CRAY.COM

Chair's Address

   The working group can be contacted via the current chair:

   Steve Alexander
   INTERACTIVE Systems Corporation
   1901 North Naper Boulevard
   Naperville, IL 60563-8895

   Phone: (708) 505-9100 x256
   EMail: stevea@isc.com

AI ELI5

On this page
PROBLEMTelnet users had to type passwords, which were sent in plain text across the network, risking interception by attackers watching the connection.
MECHANISMThe RFC defines a Telnet option that negotiates a common authentication method (such as Kerberos) between client and server, allowing both to exchange cryptographic credentials instead of passwords.
WHY IT MATTEREDThe option enables secure authentication over Telnet and supports automatic login without typing passwords. It was later superseded by SSH and other protocols.

§1The Problem with Clear-Text Passwords

The Telnet protocol lets users log into remote systems, but it has a significant security weakness: users must type their passwords, which are transmitted in clear text across the network. If the connection passes through untrusted networks, an attacker watching the packets can steal the password.

RFC 1416 defines an AUTHENTICATION option for Telnet to solve this problem. The option provides a framework for exchanging authentication information securely, so passwords do not travel in the clear. Additionally, if the Telnet client has appropriate credentials, it can automatically send the authentication information without the user typing anything.

Telnet sends everything you type, including passwords, where anyone watching the network can read it. This option lets you prove who you are with a secret code instead.

§2Commands and Negotiation

The AUTHENTICATION option uses standard Telnet option negotiation. The client sends WILL AUTHENTICATION to indicate it will support authentication. The server sends DO AUTHENTICATION to request it. Once both sides agree, the server becomes free to request authentication information.

The negotiation defines two roles: the client (the side that made the active TCP connection) and the server (the side that listened). Only the server may send a SEND command listing the authentication types it accepts. Only the client may send an IS command with authentication data. The server may send a REPLY command to respond to the client's credentials. The client may also send a NAME command to specify which account on the remote host it wishes to use.

First the client and server agree to talk about authentication. Then the server asks for credentials, the client sends them, and the server says whether it worked.

§3Authentication Types and Modifiers

The RFC defines several authentication types: NULL (no authentication), KERBEROS_V4, KERBEROS_V5, SPX, RSA, and LOKI. The Internet Assigned Numbers Authority (IANA) maintains the list for future additions.

Each authentication type is accompanied by a modifier that specifies the direction and mode of authentication. The AUTH_WHO_MASK bit indicates whether the client authenticates to the server (CLIENT_TO_SERVER) or the server authenticates to the client (SERVER_TO_CLIENT). The AUTH_HOW_MASK bit indicates whether authentication is one-way (HOW_ONE_WAY) or mutual (HOW_MUTUAL), where mutual means both sides prove their identity to each other.

This creates four possible combinations: client authenticates to server one-way, server authenticates to client one-way, both authenticate to each other mutually with client first, or both authenticate mutually with server first. The server lists its preferred authentication types in order of preference when it sends the SEND command.

Different ways to prove who you are (Kerberos, RSA, etc.) can work one-way or both ways. The server picks which methods it trusts and asks the client to use one.

§4Message Exchange Example

Telnet authentication exchange with Kerberos
ClientServer
  1. DO AUTHENTICATIONServer offers to support authentication
  2. WILL AUTHENTICATIONClient accepts
  3. SEND KERBEROS_V4Server requests Kerberos credentials
  4. IS KERBEROS_V4 + ticketClient sends username and Kerberos ticket
  5. REPLY ACCEPTServer verifies ticket and accepts

The RFC provides an example exchange using Kerberos authentication. The server requests KERBEROS_V4 with CLIENT|MUTUAL (mutual authentication with client first) or KERBEROS_V4 with CLIENT|ONE_WAY (one-way authentication) as a fallback.

The client responds with a NAME command specifying the username (e.g., 'joe') and then sends the authentication data in the IS command—in this case, a Kerberos ticket. The server verifies the ticket and replies with ACCEPT. For mutual authentication, the client then sends a CHALLENGE to verify the server's identity, and the server responds with a RESPONSE to prove it is genuine. Multiple exchanges of IS and REPLY commands may occur as needed for the chosen authentication scheme.

If the client does not support any of the offered authentication types, it should respond with NULL to indicate this. The server may then choose to close the connection.

The server asks for credentials. The client sends them with the username. The server checks them and says yes or no. If both sides need to verify each other, they send more messages to do that.

§5Security Implications

The RFC notes an important security consideration: during the authentication negotiation phase, before any authentication has occurred, neither side knows whether it is talking to the intended party. An intruder could attempt to negotiate the use of a weak authentication method, or one already compromised by the intruder. This means the choice of authentication method itself must be protected, or administrators must ensure that only strong methods are offered.

Despite this limitation, the AUTHENTICATION option is a significant improvement over sending passwords in clear text. By moving authentication out of the Telnet command stream and into a negotiated framework, the mechanism allows implementations to use strong cryptographic methods appropriate to the environment.

An attacker could try to trick you into using a weak way of proving who you are. But even so, this is much safer than typing your password where everyone can see it.

§6References