Page 156 - RHEL8 BOOK
P. 156

Step : 1 Configure the IP Address
          [root@localhost ~]# ifconfig eth0   # Check the IP Address

          Step : 2 Install Required Packages for Telnet Server
          [root@localhost ~]# yum -y install telnet-server telnet   # Install telnet-server package

          Step 3: confirm the package installation
          [root@localhost ~]# rpm -qa | grep telnet  # Confirm telnet-server package installed or not
          telnet-server-0.17-59.el7.x86_64
          telnet-0.17-59.el7.x86_64

          Step 4: Add the service to firewalld.
          [root@localhost ~]# firewall-cmd --add-service=telnet --zone=public

          Step 5: Add the service to selinux.
          [root@localhost ~]# semanage port -a -t telnetd_port_t -p tcp

          Step 6:  Configure the Telnet Server
          [root@localhost ~]# nano /etc/xinetd.d/telnet    # Configuring Telnet-Server
          # 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
          }

          Step 7: Enable and start the telnet service
          Start the service using the systemctl command.
          [root@localhost ~]# systemctl start telnet.socket

          Enable the telnet service to start at boot.
          [root@localhost ~]# systemctl enable telnet.socket

          Step 8: Allow root User Login to Telnet Server (If Required)
          So here I can connect to Telnet Server by using Username as elinuxbook and Password as Password of
          elinuxbook.
          [root@localhost ~]# nano /etc/securetty   # Allow root user to login telnet-server from Client Side
          pts/0
          pts/1
          pts/2
          pts/3


                                                       S. Pradhan
                             (MCA, MBA-IT, BCA, CCNA, MCSA 2012, RHCE, ETHICAL HACKING)
                                             Email Id:-spradhan.iiht@gmail.com
                                                           156
   151   152   153   154   155   156   157   158   159   160   161