Installing Telnet on centos/rhel/scientific Linux 6 & 7

Source: Internet
Author: User

Installing Telnet on centos/rhel/scientific Linux 6 & 7


Description

Before you install and use Telnet, you need to keep the following points in mind.

    • Using Telnet in a public network (WAN) is a very bad idea. It transmits log-in data in plaintext format. Clear text is visible to everyone.

    • If you still need telnet, it is strongly recommended that you only use it inside the LAN.

    • You can use SSH as a workaround. But be sure not to log in with the root user.

Telnet definition:

Telnet is the protocol used to telnet to a computer over a TCP/IP network. Once a connection is made to the remote computer, it becomes a virtual terminal and allows you to communicate with the remote computer.

To install Telnet:

  1. Yum installs Telnet and telnet-server

    [email protected] ~]# Yum install-y telnet telnet-server

    Telnet is now installed on your server.

  2. Edit File/etc/xinetd.d/telnet

    [Email protected] ~]# vim/etc/xinetd.d/telnet

    Set disable = no 650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M02/A4/62/wKioL1mpbj3SxxuqAAAo8e7KM04147.png "title=" Ww.png "width=" "height=" 239 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" WIDTH:600PX;HEIGHT:239PX; "alt=" Wkiol1mpbj3sxxuqaaao8e7km04147.png "/>

    Save and exit the file.

    Description: We do not need to do this in Linux 7 , for reasons such as:

    Yum installation telnet-server differences:

    Linux6 Install Telnet-server When there is xinetd dependency package is installed, and Linux7 does not have xinetd dependency package is installed!

    650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M02/05/B1/wKiom1mpb0CTITcHAAAY2ix15Xw643.png "style=" float : none; "title=" Qqq.png "alt=" Wkiom1mpb0ctitchaaay2ix15xw643.png "/>

    Linux7

    650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M00/A4/62/wKioL1mpbymCqzzGAAAavNjRRp4238.png "style=" float : none; "title=" Www.png "alt=" Wkiol1mpbymcqzzgaaaavnjrrp4238.png "/>

  3. turn on Telnet service

    Span style= "FONT-SIZE:14PX;" > in Linux 6 system:

    [[email protected] ~]# service xinetd start

    [[email  Protected] ~]# systemctl start telnet.socket

  4. Boot from startup Telnet Service

    In the Linux 6 system:

    [[email protected] ~]# chkconfig telnet on

    [Email protected] ~]# chkconfig xinetd on

    In the LINUX7 system:

    [Email protected] ~]# Systemctl enable Telnet.socket

  5. To view the Telnet service health status

    In the Linux 6 system:

    [[Email protected] ~]# service xinetd status or [[email protected] ~]#/etc/init.d/xinetd status

    In the LINUX7 system:

    [[Email protected] ~]# service telnet.socket status or [[email protected] ~]# systemctl status Telnet.socket

  6. telnet default port is 23, view listening port

    in Linux 6 system:

    650) this.width= 650, "src=" Https://s5.51cto.com/wyfs02/M02/05/B1/wKiom1mpdUPSx2v2AAAO2-eyQTU793.png "title=" Www.png "alt=" Wkiom1mpdupsx2v2aaao2-eyqtu793.png "/>

    650) this.width=650; "Src=" https://s3.51cto.com/wyfs02/M01/A4/62/ Wkiol1mpdulw15caaaao2wsbnyc615.png "title=" Qqq.png "width=" 645 "height=" "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:645px;height:53px; "alt=" Wkiol1mpdulw15caaaao2wsbnyc615.png "/>

  7. Configuration of iptables and firewall:

    Description

    (1) If you do not use iptables and firewall you can turn them off, the command to close is as follows:

    [Email protected] ~]# iptables-f

    [[email protected] ~]#/etc/init.d/iptables stop

    [Email protected] ~]# Systemctl stop Firewalld

    [Email protected] ~]# systemctl disable FIREWALLD

    (2) There is no longer iptables in Linux7, use Firewalld; the method of installing and using iptables in LINUX7 is as follows:

    [email protected] ~]# Yum install-y iptables-services

    To open the Iptables service:

    [Email protected] ~]# systemctl start iptables

    To view the Iptables service running status:

    [Email protected] ~]# systemctl status iptables

    Boot from iptables service:

    [Email protected] ~]# Systemctl enable iptables

    Using iptables:

    [Email protected] ~]# Vim/etc/sysconfig/iptables

    Add the following line "-A input-p tcp-m State--state NEW--dport 23-j ACCEPT"

    650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M00/A4/99/wKioL1muTCiRupnZAABAj_QxkHo780.png "title=" Qq.png "alt=" Wkiol1mutcirupnzaabaj_qxkho780.png "/>

    Description: Above is just demo under linux7 in Iptables installation and use, the actual work in linux7, we are using firewall!

    (3) Turn on iptables and firewall, allowing Telnet to default port 23 through firewalls and routers.

    In the Linux 6 system:

    [Email protected] ~]# Vim/etc/sysconfig/iptables

    Add the following line "-A input-p tcp-m State--state NEW--dport 23-j ACCEPT"650 "this.width=650; src= https://s5.51cto.co M/wyfs02/m02/a4/99/wkiol1muuluwqk-3aabaj_qxkho262.png "title=" Qq.png "alt=" wkiol1muuluwqk-3aabaj_qxkho262.png "/ >

    Save exit!     Restart the Iptables service.

    [Email protected] ~]# service iptables restart

    In the Linux 7 system:

    [Email protected] ~]# firewall-cmd--permanent--add-port=23/tcp

    [Email protected] ~]# Firewall-cmd--reload

  8. test

    [[email protected] ~]# yum install-y telnet  

    Description: Install the Telnet package on the client

    [[email  protected] ~]# telnet 192.169.5.121

    650) this.width=650; src= https://s1.51cto.com/wyfs02/M00/ 05/e9/wkiom1muvawy1flraaaorpp61os162.png "title=" Qq.png "alt=" Wkiom1muvawy1flraaaorpp61os162.png "/>

    Span style= "Font-family:arial, Helvetica, sans-serif;font-size:14px;" > finish!

     


This article is from the "Hand of the Paladin Control" blog, please make sure to keep this source http://wutengfei.blog.51cto.com/10942117/1962844

Installing Telnet on centos/rhel/scientific Linux 6 & 7

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.