Installing Telnet on CentOS

Source: Internet
Author: User

Learn about Telnet before installing, using Telnet to transfer data on a public network is not secure, it is recommended to use only on the local network

Using Telnet in the public network (WAN) are very very bad idea. IT transmits login data in the clear format. Everything'll is sent in plain text.
If you still need Telnet, it's highly recommended use it on the local area network only.
Alternatively, you can use SSH. But make sure "ve disabled root login in SSH.

Telnet connects to a remote computer via the TCP/IP protocol, and once the connection is established, it becomes a virtual terminal, thereby enabling local and remote communication.

Telnet is a network protocol which are used to connect to remote computers over TCP/IP network. Once establish a connection to the remote computer, it becomes a virtual terminal and would allow you to communicate WI Th 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.
Installation

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

1, install Telnet on the server using:


Yum Install Telnet telnet-server-y

2. Editing the Telnet configuration file

CentOS7 can skip this step, this machine is centOS6.7

Be mindful so you don ' t have to do this step in CentOS 7

Edit the Telnet configuration file/etc/xinetd.d/telnet;


Vi/etc/xinetd.d/telnet

Set the Disable to No

Set Disable = no:


As follows

# Default:on
# description:the Telnet Server serves Telnet sessions; It uses \
# unencrypted Username/password pairs for authentication.
Service Telnet
{
Flags = Reuse
Socket_type = Stream
wait = no
user = root
Server =/usr/sbin/in.telnetd
Log_on_failure + = USERID
Disable = no
}

3,save and quit the file. .

4. Restart the Telnet service

Now restart the Telnet service using the following command:


On CentOS 6.x Systems:

Service xinetd Start

5, when starting the server, automatically start the Telnet service, can do the following settings

Make this service to the start automatically on every reboot:

On CentOS 6:

Chkconfig Telnet on
Chkconfig xinetd on

On CentOS 7:

Systemctl Start Telnet.socket
Systemctl Enable Telnet.socket


6, let telnet default port through firewall, centos6.x, edit iptables

To allow the Telnet port through firewall, Edit file/etc/sysconfig/iptables on CentOS 6.x systems:


Vi/etc/sysconfig/iptables

Add this sentence

-A input-p tcp-m state--state NEW--dport 23-j ACCEPT

As follows

# Firewall configuration written by System-config-firewall
# Manual Customization of this file are not recommended.
*filter
: INPUT ACCEPT [0:0]
: FORWARD ACCEPT [0:0]
: OUTPUT ACCEPT [0:0]
-A input-m state--state established,related-j ACCEPT
-A input-p icmp-j ACCEPT
-A input-i lo-j ACCEPT
-A input-p tcp-m State--state NEW--dport 23-j ACCEPT
-A input-m state--state new-m tcp-p TCP--dport 22-j ACCEPT
-A input-j REJECT--reject-with icmp-host-prohibited
-A forward-j REJECT--reject-with icmp-host-prohibited
COMMIT


CentOS7, you can use the following command

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

Firewall-cmd--permanent--add-port=23/tcp
Firewall-cmd--reload


Save and exit the file.

7, restart Iptables service

Restart iptables Service:


Service Iptables Restart

Here, the server-side Telnet is ready to install.


Create test user, username sk, Password CentOS

Useradd SK
passwd SK


8, Client Installation Telnet
To install the Telnet package:

Yum Install Telnet


Use the following command on Ubnutu:

sudo apt-get install Telnet


9, open terminal, connect server

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

Telnet Server IP

Telnet 192.168.1.150


10, enter the user name password set on the server

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

Sample output:

Trying 192.168.1.150 ...
Connected to 192.168.1.150.
Escape character is ' ^] '.
Kernel 3.10.0-123.13.2.el7.x86_64 on an x86_64
Server1 Login:sk
Password:
[Email protected] ~]$

11,ok. That ' s it.

cheers!


Original address

http://www.unixmen.com/installing-telnet-centosrhelscientific-linux-6-7/

Installing Telnet on CentOS

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.