Installing Telnet In CentOS/RHEL/Scientific Linux 6 & 7


Before installing and using Telnet, keep the following in mind.

  • Using Telnet in public network(WAN) is very very bad idea. It transmits login data in the clear format. Everything will be sent in plain text.
  • If you still need Telnet, It is highly recommended use it in the local area network only.
  • Alternatively, you can use SSH. But make sure you’ve disabled root login in SSH.

What Is Telnet?

Telnet is a network protocol which is used to connect to remote computers over TCP/IP network. Once you establish a connection to the remote computer, it becomes a virtual terminal and will allow you to communicate with the remote host from your local system.

In this brief tutorial, let us see how to install Telnet, and how to access remote systems via Telnet.


Open your terminal and type the following command to install telnet:

Now, the telnet has been installed in your server. Next, edit the telnet configuration file /etc/xinetd.d/telnet;

Set disable = no:

Save and quit the file. Be mindful that you don’t have do this step in CentOS 7.

Now restart the telnet service using the following command:

On CentOS 6.x systems:

Make this service to start automatically on every reboot:

On CentOS 6:

On CentOS 7:

Allow the telnet default port 23 through your firewall and Router. To allow the telnet port through firewall, Edit file /etc/sysconfig/iptables on CentOS 6.x systems:

Add the line as shown in red color:

Save and exit the file. Restart iptables service:

On CentOS 7, run the following commands to enable telnet service through firewall.

Thats it. Now telnet server is ready to use.

Creating users

Create a test user, for example “sk” with password “centos“:

Client Side Configuration

Install telnet package:

On DEB based systems:

Now, open Terminal, and try to access your server(remote host).

If your client is Linux system, open the terminal and type the following command to connect to telnet server.

Enter username and password which we have created in the server:

Sample output:

As you see in the above output, the remote system has been successfully accessed from the local machine.

If your client is windows system, then go to Start -> Run -> Command Prompt.

In the command prompt, type the command:

Where is remote host IP address.

Now you will be able to connect to your server.

That’s it.





未经允许不得转载:VPS啦 » Installing Telnet In CentOS/RHEL/Scientific Linux 6 & 7

赞 (0) 打赏