In this Blog, we will learn how to configure Telnet Server on Centos Linux. Telnet protocol allows you to connect to remote hosts over TCP/IP network.
We need three packages to configure telnet server in Linux:
Note: Use root to configure Telnet server.
Below are the steps to configure the same:
Server-side Configuration –
Step 1 – Install the Telnet package.
yum install telnet telnet-server -y
This command will also install the dependency package. (i.e. xinetd)
Step 2 – Once you have installed the packages, open /etc/xinetd.d/telnet file
Then update this file according to below image:
Ensure to make disable = no.
Save and quit the file.
service xinetd start
Step 4 – Turn the Telnet server on using the chkconfig command to start automatically on every reboot.
chkconfig telnet on chkconfig xinetd on
Step 5 – Allow telnet into Linux firewall.
Next, Add this line (refer below image)
-A INPUT -p tcp -m state --state NEW --dport 23 -j ACCEPT
Restart the iptables services:
service iptables restart
Step 6 – We need to create a normal user to access telnet, hence by default root is not allowed to access it.
Step 7 – Verify your telnet server whether it is working or not?
Here we have configured the telnet-server, now we need to configure telnet client.
Telnet-client side configuration –
Step 1 – Go to client and Install the telnet package-
yum install telnet
Step 2 – type the following command to check connectivity with server-
We are getting reply of ping from server so we have connectivity with server.
Step 3 – Now connect with your telnet server using below command-
The telnet server for Linux is thus configured.
Hope this Blog was informative enough.
Feel free to contact us at firstname.lastname@example.org for any further query.
Keep visiting our site www.acadgild.com for more updates on Bigdata and other technologies.