home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1997 December / Internet_Info_CD-ROM_Walnut_Creek_December_1997.iso / drafts / draft_ietf_q_t / draft-ietf-secsh-userauth-01.txt < prev    next >
Text File  |  1997-07-31  |  27KB  |  707 lines

  1. Network Working Group                           Tatu Ylonen <ylo@ssh.fi>
  2. INTERNET-DRAFT                               SSH Communications Security
  3. draft-ietf-secsh-userauth-01.txt                           July 30, 1997
  4. Expires in six months
  5.  
  6.  
  7.                       SSH Authentication Protocol
  8.  
  9. Status of This memo
  10.  
  11. This document is an Internet-Draft. Internet-Drafts are working
  12. documents of the Internet Engineering Task Force (IETF), its areas,
  13. and its working groups. Note that other groups may also distribute
  14. working documents as Internet-Drafts.
  15.  
  16. Internet-Drafts are draft documents valid for a maximum of six
  17. months and may be updated, replaced, or obsoleted by other documents
  18. at any time. It is inappropriate to use Internet-Drafts as reference
  19. material or to cite them other than as ``work in progress.''
  20.  
  21. To learn the current status of any Internet-Draft, please check
  22. the ``1id-abstracts.txt'' listing contained in the Internet-Drafts
  23. Shadow Directories on ftp.is.co.za (Africa), nic.nordu.net (Europe),
  24. munnari.oz.au (Pacific Rim), ds.internic.net (US East Coast),
  25. or ftp.isi.edu (US West Coast).
  26.  
  27. Abstract
  28.  
  29. This documents describes the SSH authentication protocol.  It is used to
  30. prove that the client is authorized to access the requested service with
  31. the supplied user name.  This authorization can be demonstrated through
  32. possession of a password, through possession of a key, by authenticating
  33. the client host and user, by some other method, or a combination of
  34. these.
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58. Tatu Ylonen <ylo@ssh.fi>                                        [page 1]
  59.  
  60. INTERNET-DRAFT                                             July 30, 1997
  61.  
  62. Table of Contents
  63.  
  64. 1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . . . .  2
  65. 2.  User Authentication   . . . . . . . . . . . . . . . . . . . . . .  2
  66.   2.1.  Authentication Requests   . . . . . . . . . . . . . . . . . .  3
  67.   2.2.  Responses to Authentication Requests  . . . . . . . . . . . .  4
  68.   2.3.  No Authentication   . . . . . . . . . . . . . . . . . . . . .  5
  69.   2.4.  Password Authentication   . . . . . . . . . . . . . . . . . .  5
  70.   2.5.  Challenge-Response Authentication   . . . . . . . . . . . . .  6
  71.   2.6.  SecurID Authentication  . . . . . . . . . . . . . . . . . . .  6
  72.   2.7.  Public Key Authentication   . . . . . . . . . . . . . . . . .  7
  73.   2.8.  Host-Based Authentication   . . . . . . . . . . . . . . . . .  9
  74.   2.9.  Kerberos Authentication   . . . . . . . . . . . . . . . . . . 10
  75.   2.10.  When Authentication Is Complete  . . . . . . . . . . . . . . 11
  76. 3.  Banner Message  . . . . . . . . . . . . . . . . . . . . . . . . . 11
  77. 4.  Message Numbers   . . . . . . . . . . . . . . . . . . . . . . . . 11
  78. 5.  Security Considerations   . . . . . . . . . . . . . . . . . . . . 12
  79. 6.  Address of Author   . . . . . . . . . . . . . . . . . . . . . . . 12
  80.  
  81.  
  82.  
  83. 1.  Introduction
  84.  
  85. This protocol is designed to run over the SSH transport layer protocol
  86. using the same packet-based protocol as the transport layer.  The
  87. service name is "ssh-userauth".
  88.  
  89. This document should be read only after reading the transport layer
  90. document.  This document uses terminology and notation from the
  91. transport layer document without further explanation.
  92.  
  93. Authentication works as follows: the client declares the service name,
  94. and the user name under which to access this service.  The server
  95. responds to this declaration with a set of acceptable authentication
  96. methods for the given user/service combination.  The client then sends
  97. an authentication request using one of the methods listed by the server.
  98. This dialog continues until access has been granted, or until either the
  99. client or the server disconnects.
  100.  
  101. When the authentication protocols protocol starts, it receives the
  102. session identifier from the transport layer protocol.  The session
  103. identifier uniquely identifies this session and is suitable for signing
  104. to prove ownership of a private key.
  105.  
  106. 2.  User Authentication
  107.  
  108. The server drives the authentication by telling the client which
  109. authentications can usefully continue the dialog at any given time.  The
  110. client has the freedom to try the methods listed by the server in any
  111. order.  This gives the server complete control ver the authentication
  112. process if it so desired, but also gives enough flexibility for the
  113. client to use the methods it supports or that are most convenient for
  114. the user when multiple methods are offered by the server.
  115.  
  116.  
  117. Tatu Ylonen <ylo@ssh.fi>                                        [page 2]
  118.  
  119. INTERNET-DRAFT                                             July 30, 1997
  120.  
  121. Authentication methods are identified by names.  Some methods are
  122. defined in the protocol; additional methods may be defined using the
  123. syntax "name@domainname" as the method name (for example,
  124. "footoken@footoken.com").  This ensures that private extensions can be
  125. implemented without breaking compatibility and without requiring a
  126. central registry of method names.  Method names are case-sensitive, and
  127. must consist of alphanumeric characters and hyphens.
  128.  
  129. The following methods are predefined:
  130.  
  131.           none                 Unsupported authentication method
  132.           password             Password-based authentication
  133.           securid              SecurID authentication
  134.           otp-md4              One-time passwords using MD4 hashing
  135.           otp-md5              One-time passwords using MD5 hashing
  136.           otp-sha1             One-time passwords using SHA1 hashing
  137.           publickey            Possession of private key
  138.           hostbased            Client host and user (.rhosts-style)
  139.           kerberos4            Kerberos v4 authentication
  140.           kerberos5            Kerberos v5 authentication
  141.           kerberos-afs         AFS Kerberos authentication
  142.  
  143. The "none" method should never be listed as supported.  However, it may
  144. be sent by the client.  The server should always reject this request,
  145. unless the client is to be allowed in without any authentication.  The
  146. main purpose of sending this request is to get the list of supported
  147. methods from the server.
  148.  
  149. There are no mandatory authentication methods; all methods are optional.
  150. The motivation for this is that which methods to use is a matter of
  151. local policy rather than protocol.  However, it is strongly recommended
  152. that all implementations support at least "password" authentication.
  153.  
  154. The server should have a timeout for authentication, and disconnect if
  155. the authentication has not been accepted within the timeout period.  The
  156. recommended timeout period is 10 minutes.  Additionally, the
  157. implementation may want to limit the number of failed authentication
  158. attempts a client may perform in a single session (the recommended limit
  159. is 20 attempts).  If the threshold is exceeded, the server should
  160. disconnect.
  161.  
  162. 2.1.  Authentication Requests
  163.  
  164. All authentication requests use the same generic message format.  Only
  165. the first few fields are defined; the remaining fields depend on the
  166. authentication method.
  167.  
  168.   byte      SSH_MSG_USERAUTH_REQUEST
  169.   string    username
  170.   string    service
  171.   string    method name
  172.   rest of the packet is method-specific
  173.  
  174.  
  175.  
  176. Tatu Ylonen <ylo@ssh.fi>                                        [page 3]
  177.  
  178. INTERNET-DRAFT                                             July 30, 1997
  179.  
  180. The username and service are repeated in every new authentication
  181. attempt, and may change.  The server implementation must carefully check
  182. them in every message, and must flush any accumulated authentication
  183. state if they change.
  184.  
  185. Service specifies the service to start after authentication.  There may
  186. be several different authenticated services provided.  If the requested
  187. service is not available, the server may disconnect immediately or any
  188. time later.  Sending a proper disconnect message is recommended.
  189.  
  190. If the requested user does not exist, the server is allowed to
  191. disconnect, or may send a bogus list of acceptable authentications but
  192. never accept any.  This makes it possible for the server to avoid
  193. disclosing information about which accounts exist.
  194.  
  195. While there is usually little point in clients sending requests that the
  196. server does not list as acceptable, sending such requests is not an
  197. error, and the server should simply reject requests that it does not
  198. recognize.
  199.  
  200. An authentication request may result in a further exchange of messages.
  201. All such messages depend on the authentication method used, and the
  202. client may at any time continue with a new SSH_MSG_USERAUTH_REQUEST
  203. message, in which case the server must abandon the previous
  204. authentication attempt and continue with the new one.
  205.  
  206. 2.2.  Responses to Authentication Requests
  207.  
  208. If the server rejects the authentication request, it responds with
  209.  
  210.             byte      SSH_MSG_USERAUTH_FAILURE
  211.             string    authentications that can continue
  212.             boolean   partial success
  213.  
  214. "Authentications that can continue" is a comma-separated list of
  215. authentication method names that may productively continue the
  216. authentication dialog.
  217.  
  218. It is recommended that servers only include those methods in the list
  219. that are actually useful.  However, it is not illegal to include methods
  220. that cannot be used to authenticate the user.
  221.  
  222. Already successfully completed authentications should not be included in
  223. the list unless they really should be performed again for some weird
  224. reason.
  225.  
  226. "Partial success" is TRUE if the particular authentication request, in
  227. response to which this is being sent, was accepted, but more
  228. authentication is still needed.  It is FALSE if the request was not
  229. successfully processed.
  230.  
  231. When the server accepts authentication, it responds with
  232.  
  233.  
  234.  
  235. Tatu Ylonen <ylo@ssh.fi>                                        [page 4]
  236.  
  237. INTERNET-DRAFT                                             July 30, 1997
  238.  
  239.             byte      SSH_MSG_USERAUTH_SUCCESS
  240.  
  241. The client may send several authentication requests without waiting for
  242. responses from previous requests.  The server will acknowledge any
  243. failed requests with a SSH_SMSG_AUTH_FAILURE message.  However,
  244. SSH_SMSG_AUTH_SUCCESS is sent only once.
  245.  
  246. Once SSH_MSG_USERAUTH_SUCCESS has been sent, any further authentication
  247. requests received after that are silently ignored, while any non-
  248. authentication messages sent by the client will be passed to the service
  249. being run above this authentication protocol.
  250.  
  251. 2.3.  No Authentication
  252.  
  253. A client may request the list of real authentication methods that may
  254. continue by using the "none" authentication method.  This is actually an
  255. authentication request: if no authentication at all is needed for the
  256. user, this returns SSH_MSG_USERAUTH_SUCCESS.  Otherwise, this returns
  257. failure and with it the list of authentication methods that can
  258. continue.
  259.  
  260. This method should never be listed as supported by the server.
  261.  
  262. 2.4.  Password Authentication
  263.  
  264. Password authentication uses the following packets.  Note that a server
  265. may request the user to change password.
  266.  
  267.             byte      SSH_MSG_USERAUTH_REQUEST
  268.             string    username
  269.             string    service
  270.             string    "password"
  271.             boolean   FALSE
  272.             string    plaintext password
  273.  
  274.             byte      SSH_MSG_USERAUTH_PASSWD_CHANGEREQ
  275.             string    prompt
  276.  
  277.             byte      SSH_MSG_USERAUTH_REQUEST
  278.             string    username
  279.             string    service
  280.             string    "password"
  281.             boolean   TRUE
  282.             string    plaintext old password
  283.             string    plaintext new password
  284.  
  285.             byte      SSH_MSG_USERAUTH_PASSWD_CHANGEREPLY
  286.             boolean   password changed
  287.  
  288. Normally, the client sends the first form, and the server responds with
  289. success or failure.  However, the server may also send a
  290. SSH_MSG_USERAUTH_PASSWD_CHANGEREQ.  In this case, the client should
  291. request a new password from the user, and send a new request of the
  292.  
  293.  
  294. Tatu Ylonen <ylo@ssh.fi>                                        [page 5]
  295.  
  296. INTERNET-DRAFT                                             July 30, 1997
  297.  
  298. second form to change the password.  The server will then reply with
  299. SSH_MSG_USERAUTH_PASSWD_CHANGEREPLY.  If "password changed" is true, the
  300. server will continue with either SSH_MSG_USERAUTH_SUCCESS or
  301. SSH_MSG_USERAUTH_FAILURE.  Otherwise, the dialog continues and the
  302. client can try changing the password again.
  303.  
  304. 2.5.  Challenge-Response Authentication
  305.  
  306. Most challenge-response authentication methods use the following message
  307. exchange:
  308.  
  309.             byte      SSH_MSG_USERAUTH_REQUEST
  310.             string    username
  311.             string    service
  312.             string    method name
  313.             boolean   FALSE
  314.  
  315. The server responds with either SSH_MSG_USERAUTH_FAILURE or
  316.  
  317.   byte      SSH_MSG_USERAUTH_CHALLENGE
  318.   string    prompt
  319.  
  320. The client then responds with either a new authentication request or
  321.  
  322.             byte      SSH_MSG_USERAUTH_REQUEST
  323.             string    username
  324.             string    service
  325.             string    method name
  326.             boolean   TRUE
  327.             string    response
  328.  
  329. The server responds to this message with either success or failure.
  330.  
  331. The "otp-md4", "otp-md5" and "otp-sha1" methods are defined in RFC 1938,
  332. and follow this pattern.
  333.  
  334. 2.6.  SecurID Authentication
  335.  
  336. SecurID is a timing-based hardware token authenticator.  The user enters
  337. a code displayed on the token as authentication.  There are different
  338. versions of the SecurID tokens.  Some versions support changing the PIN
  339. (either to a server-supplied or user-supplied pin), and some might even
  340. allow textual passphrases.
  341.  
  342. The method name for SecurID authentication is "securid".  The following
  343. packets are used:
  344.  
  345.             byte      SSH_MSG_USERAUTH_REQUEST
  346.             string    username
  347.             string    service
  348.             string    "securid"
  349.             boolean   is_new_pin
  350.             string    pin
  351.  
  352.  
  353. Tatu Ylonen <ylo@ssh.fi>                                        [page 6]
  354.  
  355. INTERNET-DRAFT                                             July 30, 1997
  356.  
  357.   byte      SSH_MSG_USERAUTH_SECURID_PINREQ
  358.   boolean   user may supply
  359.   string    suggested pin
  360.   uint32    min len
  361.   uint32    max len
  362.   boolean   nondigits ok
  363.  
  364.             byte      SSH_MSG_USERAUTH_SECURID_PINREPLY
  365.             boolean   pin accepted
  366.  
  367. Authentication starts by the client sending the SSH_MSG_USERAUTH_REQUEST
  368. message with "is_new_pin" FALSE.  The server responds with
  369. SSH_MSG_USERAUTH_SUCCESS, SSH_MSG_USERAUTH_FAILURE, or with
  370. SSH_MSG_USERAUTH_SECURID_PINREQ if it wants the user to change his/her
  371. pincode.  In this message, "user may supply" is TRUE if the user may
  372. choose the new pin, and FALSE if the server-supplied pin (in "suggested
  373. pin") must be used.  "Suggested pin" is a new PIN suggested by the
  374. server, but may also be empty.  "Min len" is the minimum length of the
  375. new pin, "max len" is the maximum length, and "nondigits ok" is TRUE if
  376. characters other than digits are allowed.
  377.  
  378. To change the pin, the client continues with a new
  379. SSH_MSG_USERAUTH_REQUEST with "is_new_pin" TRUE and the new pin in
  380. "pin".  The server responds to this message with
  381. SSH_MSG_USERAUTH_SECURID_PINREPLY (with "pin accepted" TRUE if the new
  382. pin is now in effect, FALSE otherwise), followed by either
  383. SSH_MSG_USERAUTH_SUCCESS or SSH_MSG_USERAUTH_FAILURE.  Note that some
  384. versions of SecurID do not permit the user in if the pin was changed.
  385.  
  386. 2.7.  Public Key Authentication
  387.  
  388. The possession of a private key can serve as authentication.  This
  389. method works by sending a signature created with the private key of the
  390. user, which the server checks with the client user's public key.
  391.  
  392. Private keys are often stored encrypted at the client host, and the user
  393. must supply a passphrase before the signature can be generated.  To
  394. avoid needing to supply passphrases when it is not necessary, the client
  395. can optionally verify whether a particular key would be acceptable as
  396. authentication.  This is done with the following message.
  397.  
  398.   byte      SSH_MSG_USERAUTH_REQUEST
  399.   string    username
  400.   string    service
  401.   string    "publickey"
  402.   boolean   FALSE
  403.   string    public key algorithm name
  404.   string    public key to be used for authentication
  405.  
  406. Public key algorithms are defined in the transport layer specification.
  407. The "public key to be used for authentication" may include certificates.
  408.  
  409. The server will respond to this message with either
  410.  
  411.  
  412. Tatu Ylonen <ylo@ssh.fi>                                        [page 7]
  413.  
  414. INTERNET-DRAFT                                             July 30, 1997
  415.  
  416. SSH_MSG_USERAUTH_FAILURE or with
  417.  
  418.             byte      SSH_MSG_USERAUTH_PK_OK
  419.             string    public key algorithm name from the request
  420.             string    public key from the request
  421.  
  422. To do actual authentication, the client should then send a signature
  423. generated using the private key.  It is permissible to send the
  424. signature directly without first verifying whether the key is
  425. acceptable.
  426.  
  427.             byte      SSH_MSG_USERAUTH_REQUEST
  428.             string    username
  429.             string    service
  430.             string    "publickey"
  431.             boolean   TRUE
  432.             string    public key algorithm name
  433.             string    public key to be used for authentication
  434.             string    signature
  435.  
  436. Signature  is a signature by the corresponding private key of the HASH
  437. of the concatenation of the following, in this order:
  438.  
  439. o  session identifier (which binds the signature to the server host key
  440.    and the particular key exchange),
  441.  
  442. o  length of the user name as a 32-bit integer, msb first,
  443.  
  444. o  user name (without length or null characters),
  445.  
  446. o  length of the service name as a 32-bit integer, msb first,
  447.  
  448. o  service name (without length or null characters),
  449.  
  450. o  length of the public key algorithm name as a 32-bit integer, msb
  451.    first,
  452.  
  453. o  public key algorithm name (without length or null characters),
  454.  
  455. o  length of the public key from the message as a 32-bit integer, msb
  456.    first, and
  457.  
  458. o  public key from the message (without length or null characters).
  459.  
  460. When the server receives this message, it checks whether the supplied
  461. key is acceptable for authentication, and if so, checks whether the
  462. signature is correct.
  463.  
  464. If both checks succeed, authentication may be granted (the server may
  465. also require further authentication with other methods, without letting
  466. the client know at this point that authentication has partially
  467. succeeded).
  468.  
  469.  
  470.  
  471. Tatu Ylonen <ylo@ssh.fi>                                        [page 8]
  472.  
  473. INTERNET-DRAFT                                             July 30, 1997
  474.  
  475. 2.8.  Host-Based Authentication
  476.  
  477. Some sites wish to allow authentication based on the host where the user
  478. is coming from and the user name on the remote host.  While this form of
  479. authentication is not suitable for high-security sites, it can be very
  480. convenient in many environments.  The client requests this form of
  481. authentication by sending the following message.  It is rather similar
  482. to the Unix "rhosts" and "hosts.equiv" styles of authentication, except
  483. that the identity of the client host is checked more rigorously.
  484.  
  485. This method works by having the client send a signature created with the
  486. private key of the client host, which the server checks with that host's
  487. public key.  Once the client host's identity is established,
  488. authorization, but no further authentication, is performed based on the
  489. usernames on the server and client, and the client host name.
  490.  
  491.             byte      SSH_MSG_USERAUTH_REQUEST
  492.             string    username
  493.             string    service
  494.             string    "hostbased"
  495.             string    public key algorithm for host key
  496.             string    public host key for client host
  497.             string    client host name
  498.             string    client user name
  499.             string    signature
  500.  
  501. Public key algorithm names for use in "public key algorithm for host
  502. key" are defined in the transport layer specification.  The "public host
  503. key for client host" may include certificates.
  504. Signature is a signature with the private host key for the client host
  505. of the HASH (where the hash algorithm is from the transport layer) of
  506. the concatenation of the following, in this order:
  507.  
  508. o  session identifier (which binds the signature to the server host key
  509.    and the particular key exchange),
  510.  
  511. o  length of the user name as a 32-bit integer, msb first,
  512.  
  513. o  user name (without length or null characters),
  514.  
  515. o  length of the service name as a 32-bit integer, msb first,
  516.  
  517. o  service name (without length or null characters),
  518.  
  519. o  length of the public host key algorithm name as a 32-bit integer, msb
  520.    first,
  521.  
  522. o  public host key algorithm name (without length or null characters),
  523.  
  524. o  length of the public host key from the message as a 32-bit integer,
  525.    msb first,
  526.  
  527. o  public host key from the message (without length or null characters),
  528.  
  529.  
  530. Tatu Ylonen <ylo@ssh.fi>                                        [page 9]
  531.  
  532. INTERNET-DRAFT                                             July 30, 1997
  533.  
  534. o  length of the client host name as a 32-bit integer, msb first,
  535.  
  536. o  client host name (without length or null characters),
  537.  
  538. o  length of the client user name as a 32-bit integer, msb first, and
  539.  
  540. o  client user name (without length or null characters).
  541.  
  542. Authentication is accepted if the server can verify that the host key
  543. actually belongs to the client host named in the message, the given user
  544. on that host is allowed to log in, and the signature is a valid
  545. signature on the appropriate value by the given host key.  (The server
  546. is also allowed to ignore the client user name, if it wants to
  547. authenticate only the client host.)
  548.  
  549. It is recommended that whenever possible, the server perform additional
  550. checks to verify that the network address obtained from the (untrusted)
  551. network matches the given client host name.  This makes exploiting
  552. compromised host keys more difficult.  Note that this may require
  553. special handling for connections coming through a firewall.
  554.  
  555. 2.9.  Kerberos Authentication
  556.  
  557. There are several ways to authenticate the user using Kerberos (OSF DCE
  558. and AFS are also incarnations of Kerberos).  Different versions of
  559. Kerberos (v4, v5, DCE, and AFS) have different capabilities.  Separate
  560. messages have been defined for each of these.  In each case, the server
  561. should respond with success or failure.
  562.  
  563.             byte      SSH_MSG_USERAUTH_REQUEST
  564.             string    username
  565.             string    service
  566.             string    "kerberos4"
  567.             string    kerberos v4 credentials
  568.  
  569.             byte      SSH_MSG_USERAUTH_REQUEST
  570.             string    username
  571.             string    service
  572.             string    "kerberos5"
  573.             string    kerberos v5 credentials
  574.             string    kerberos v5 ticket granting ticket (may be empty)
  575.  
  576.             byte      SSH_MSG_USERAUTH_REQUEST
  577.             string    username
  578.             string    service
  579.             string    "kerberos-afs"
  580.             string    AFS token
  581.  
  582. The Kerberos authentication requests should be sent before other
  583. authentication requests.  The other authentication methods may need to
  584. access files from the user's home directory, which may not be accessible
  585. until e.g. the AFS token has been passed.  Note that even if these
  586. requests fail, they may have side effects, such as making the home
  587.  
  588.  
  589. Tatu Ylonen <ylo@ssh.fi>                                       [page 10]
  590.  
  591. INTERNET-DRAFT                                             July 30, 1997
  592.  
  593. directory accessible.
  594.  
  595. 2.10.  When Authentication Is Complete
  596.  
  597. Authentication is complete when the server has responded with
  598. SSH_MSG_USERAUTH_SUCCESS; any SSH_MSG_USERAUTH_REQUEST messages received
  599. after sending this message are silently ignored.
  600.  
  601. When sending SSH_MSG_USERAUTH_SUCCESS, the server also starts whatever
  602. application was requested as the service.  Any non-authentication
  603. messages received after this point are passed to the requested service.
  604.  
  605. 3.  Banner Message
  606.  
  607. In some jurisdictions, sending a warning message before authentication
  608. may be relevant to getting legal protection.  Many Unix machines, for
  609. example, display text from /etc/issue, or use "tcp_wrappers" or similar
  610. software to display a banner before issuing a login prompt.
  611.  
  612. The SSH server may send a SSH_MSG_USERAUTH_BANNER message at any time
  613. before authentication is successful.  This message contains text to be
  614. displayed to the client user before authentication is attempted.  The
  615. form is as follows, where "message" may contain newlines:
  616.  
  617.             byte      SSH_MSG_USERAUTH_BANNER
  618.             string    message
  619.  
  620. The client should by default display the message on the screen.
  621. However, since the message is likely to be sent for every login attempt,
  622. and since some client software will need to open a separate window for
  623. this warning, the client software may allow the user to explicitly
  624. disable the display of banners from the server.
  625.  
  626. 4.  Message Numbers
  627.  
  628. All message numbers used by this authentication protocol are in the
  629. range 20..29, which is part of the range reserved for protocols running
  630. on top of the SSH transport layer protocol.
  631.  
  632. Message numbers 30 and higher are reserved for protocols running after
  633. this authentication protocol, so receiving one of them before
  634. authentication is complete is an error, to which the server must respond
  635. by disconnecting (preferably with a proper disconnect sent first to ease
  636. troubleshooting).
  637.  
  638. After successful authentication, such messages are passed to the higher-
  639. level service.
  640.  
  641. These are the general authentication message codes:
  642.  
  643. #define SSH_MSG_USERAUTH_REQUEST            20
  644. #define SSH_MSG_USERAUTH_FAILURE            21
  645. #define SSH_MSG_USERAUTH_SUCCESS            22
  646.  
  647.  
  648. Tatu Ylonen <ylo@ssh.fi>                                       [page 11]
  649.  
  650. INTERNET-DRAFT                                             July 30, 1997
  651.  
  652. #define SSH_MSG_USERAUTH_BANNER             23
  653.  
  654. In addition to the above, there is a range of message numbers (25..29)
  655. reserved for method-specific messages.  These messages are only sent by
  656. the server (client only sends SSH_MSG_USERAUTH_REQUEST messages).
  657. Differnet authentication methods reuse the same message numbers.
  658.  
  659. /* Password */
  660. #define SSH_MSG_USERAUTH_PASSWD_CHANGEREQ   25
  661. #define SSH_MSG_USERAUTH_PASSWD_CHANGEREPLY 26
  662. /* Key-based */
  663. #define SSH_MSG_USERAUTH_PK_OK              25
  664. /* One-time passwords */
  665. #define SSH_MSG_USERAUTH_CHALLENGE          25
  666. /* SecurID */
  667. #define SSH_MSG_USERAUTH_SECURID_PINREQ     25
  668. #define SSH_MSG_USERAUTH_SECURID_PINREPLY   26
  669.  
  670. 5.  Security Considerations
  671.  
  672. The purpose of this protocol is to perform client user authentication.
  673. It assumed that this runs over a secure transport layer protocol, which
  674. has already authenticated the server machine, established an encrypted
  675. communications channel, and computed a unique session identifier for
  676. this session.
  677.  
  678. Several authentication methods with different security characteristics
  679. are allowed.  It is up to the server's local policy to decide which
  680. methods (or combinations of methods) it is willing to accept for each
  681. user.
  682.  
  683. 6.  Address of Author
  684.  
  685.               Tatu Ylonen
  686.               SSH Communications Security Ltd.
  687.               Tekniikantie 12
  688.               FIN-02150 ESPOO
  689.               Finland
  690.  
  691.               E-mail: ylo@ssh.fi
  692.  
  693.  
  694.  
  695.  
  696.  
  697.  
  698.  
  699.  
  700.  
  701.  
  702.  
  703.  
  704.  
  705.  
  706. Tatu Ylonen <ylo@ssh.fi>                                       [page 12]
  707.