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:
A. xinetd
B. telnet-server
C. telnet-client
Note: Use root to configure Telnet server.
Below are the steps to configure the same:
Server-side Configuration –
Step 1 – Install the Telnet package.
1 |
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
1 |
vi /etc/xinetd.d/telnet |
Then update this file according to below image:
Ensure to make disable = no.
Save and quit the file.
Step 3 – Now start the telnet service using the following command:
1 |
service xinetd start |
Step 4 – Turn the Telnet server on using the chkconfig command to start automatically on every reboot.
1 2 |
chkconfig telnet on chkconfig xinetd on |
Step 5 – Allow telnet into Linux firewall.
1 |
vi /etc/sysconfig/iptables |
Next, Add this line (refer below image)
1 |
-A INPUT -p tcp -m state --state NEW --dport 23 -j ACCEPT |
Restart the iptables services:
1 |
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?
1 |
telnet ipaddress |
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-
1 |
yum install telnet |
Step 2 – type the following command to check connectivity with server-
1 |
ping server_ip |
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-
1 |
telnet server-ip |
The telnet server for Linux is thus configured.
Leave a Reply