014.06.12.2. Can you explain the client-server model of Telnet and how it establishes a connection, including the negotiation phase and data exchange process?
Protocol:- The client sends a request to the server, and the server processes the request and sends a response.
Establishing Connection:- The user, through a Telnet client, initiates a connection with a Telnet server. The server listening on TCP port 23, by default, accepts the connection, creating a virtual terminal session.
Negotiation:- Telnet performs a negotiation between the client and server to agree on various parameters, like, the type of terminal, character set, and other options using Telnet commands and options.
Data Exchange:- After the negotiation, the user can input commands as if they were directly interacting with the server's terminal. The server executes the command and returns the output to the client.
For terminating the connection, anyone from the client or server can terminate the connection and resources get freed.