By default, Telnet server is disabled for security purposes in favor of SSH.  However, you can enable Telnet for testing purposes or for legacy scripts.

First, install the necessary packages.

We’ll need to configure the inetd configuration. Using your favorite editor and with root permission, open up /etc/inetd.conf. Unless you’ve modified this file, it will probably not exist or be pretty empty.
Add the following line to the end of the file and save it.

Next, we’ll need to configure the xinetd service. Again, using your favorite editor and with root permission, open up /etc/xinetd.conf. And, again, unless you’ve modified this file, it will be pretty empty.
Add the following lines to the end of the file and save it.

You can change telnet port number by editing /etc/services with this line:

If you’d like to update the default configuration, edit /etc/xinetd.d/telnet and add the following:

and for extra security you can add these lines as you like:

Finally, use the following command to start the telnet server:

Now, to test that it’s running properly:

If successful, you should see the telnet server running on port 23 (or whichever port you chose, if you configured something different above).