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.