Service Management-telnet

Source: Internet
Author: User
Tags telnet program

Service Management-telnet-What is telnet between the server and client? The Telnet protocol is a member of the TCP/IP protocol family and is the standard protocol and main method of the Internet remote login service. It provides users with the ability to complete remote host work on local computers. Use the telnet program on the terminal user's computer to connect to the server. End users can enter commands in the telnet program. These commands will run on the server, just as they are directly entered on the server console. You can control the server locally. To start a telnet session, you must enter the user name and password to log on to the server. Telnet is a common method to remotely control Web servers. [Plain] # Server01: Install telnet Server [root @ serv01 xinetd. d] # yum installtelnet-server *-y # enable the Service [root @ serv01 xinetd. d] # chkconfig telnet on # restart the xinetd service [root @ serv01 xinetd. d] #/etc/init. d/xinetdrestart Stopping xinetd: [OK] Starting xinetd: [OK] # view the network status again [root @ serv01 xinetd. d] # netstat-langput | grep "telnet" tcp 0 0 192.168.1.11: 23 192.168.1.12: 57169 ESTABLISHED 2488/in. telnetd: 19 [root @ serv01 xine Td. d] # netstat-langput | grep "xin" tcp 0: 22: * LISTEN 2486/xinetd tcp 0 0: 23 ::: * LISTEN 2486/xinetd # Server02: Install the telnet client [root @ serv02. ssh] # yum install telnet-y # The client remotely connects to Log On Through telnet. Be sure to use the common user [root @ serv02. ssh] # telnet 192.168.1.11 Trying 192.168.1.11... connected to 192.168.1.11. escape character is '^]'. red Hat Enterprise Linux Server release 6.1 (Santiago) Kernel 2.6.32-131.0.15. El6.x86 _ 64 on anx86_64 login: hongyi Password: Last login: Tue Aug 6 19:44:31 from 192.168.1.1 [hongyi @ serv01 ~] $2 telnet features [plain] # plaintext transmission, root login not allowed # telnet is plaintext transmission, root login not allowed # we usually use normal user login, then su-switches to the root user. [Root @ serv02. ssh] # telnet 192.168.1.11 Trying 192.168.1.11... connected to 192.168.1.11. escape character is '^]'. red Hat Enterprise Linux Server release 6.1 (Santiago) Kernel 2.6.32-131.0.15.el6.x86 _ 64 on anx86_64 login: root Password: Login incorrect [root @ serv01 xinetd. d] # pwd/etc/xinetd. d [root @ serv01 xinetd. d] # cat telnet # default: on # description: The telnet server servestelnet sessions; It uses \ # unencryptedusername/password pairs for authentication. service telnet {disable = no flags = REUSE socket_type = stream wait = no user = root server =/usr/sbin/in. telnetd log_on_failure + = USERID} # service ssh: the name must be unique. Do not repeat 3. telnet only allows access from an IP address or CIDR Block (only_from) [plain] # edit the file, only access to [root @ serv01 xinetd. d] # vim telnet [root @ serv01 xinetd. d] # cat telnet # default: on # description: The telnet server servestelnet sessions; it uses \ # unencryptedusername/password pairs for authentication. service telnet {disable = no flags = REUSE socket_type = stream wait = no user = root server =/usr/sbin/in. telnetd log_on_failure + = USERID only_from = 192.168.1.12} # restart the service [root @ serv01 xinetd. d] #/etc/init. d/xinetd restart Stopping xinetd: [OK] Starting xinetd: [OK] # serv02 can be accessed normally [r Oot @ serv02. ssh] # telnet 192.168.1.11 Trying 192.168.1.11... connected to 192.168.1.11. escape character is '^]'. red Hat Enterprise Linux Server release 6.1 (Santiago) Kernel 2.6.32-131.0.15.el6.x86 _ 64 on anx86_64 login: hongyi Password: Last login: Tue Aug 6 23:20:57 from 192.168.1.12 [hongyi @ serv01 ~] $ Exit ogout Connection closed by foreign host. [root @ serv02. ssh] # serv02 cannot be accessed normally [root @ serv03. ssh] # yum install telnet-y [root @ serv03. ssh] # telnet 192.168.1.11 Trying 192.168.1.11... connected to 192.168.1.11. escape character is '^]'. connection closed by foreign host. 192.168.1.0/24 172.16.1.0/24 192.168.1.0/255.255.255.0 X access_times =-4 telnet does not allow access from an IP address or a network segment (no_access) [plain] # No_access [root @ serv01 xinetd. d] # vim telnet [root @ serv01 xinetd. d] # cat telnet # default: on # description: The telnet server servestelnet sessions; it uses \ # unencryptedusername/password pairs for authentication. service telnet {disable = no flags = REUSE socket_type = stream wait = no user = root server =/usr/sbin/in. telnetd log_on_failure + = USERID no_access = 192.168.1.12} [root @ serv01 Xinetd. d] #/etc/init. d/xinetdrestart Stopping xinetd: [OK] Starting xinetd: [OK] [root @ serv02. ssh] # telnet 192.168.1.11 Trying 192.168.1.11... connected to 192.168.1.11. escape character is '^]'. connection closed by foreign host. [root @ serv03. ssh] # telnet 192.168.1.11 Trying 192.168.1.11... connected to 192.168.1.11. escape character is '^]'. red Hat Enterprise Linux Server release 6.1 (Sant Iago) Kernel 2.6.32-131.0.15.el6.x86 _ 64 on anx86_64 login: hongyi Password: Last login: Tue Aug 6 23:41:22 from 192.168.1.12 [hongyi @ serv01 ~] $ # Network segment [root @ serv01 xinetd. d] # vim telnet [root @ serv01 xinetd. d] # cat telnet # default: on # description: The telnet server servestelnet sessions; it uses \ # unencryptedusername/password pairs for authentication. service telnet {disable = no flags = REUSE socket_type = stream wait = no user = root server =/usr/sbin/in. telnetd log_on_failure + = USERID only_from = 192.168.1.0/24} [root @ serv01 xine Td. d] #/etc/init. d/xinetdrestart Stopping xinetd: [OK] Starting xinetd: [OK] [root @ serv02. ssh] # telnet 192.168.1.11 Trying 192.168.1.11... connected to 192.168.1.11. escape character is '^]'. red Hat Enterprise Linux Server release 6.1 (Santiago) Kernel 2.6.32-131.0.15.el6.x86 _ 64 on anx86_64 login: hongyi Password: Last login: Tue Aug 6 23:46:23 from 192.168.1.13 [hongyi @ serv01 ~] $ [Root @ serv03. ssh] # telnet 192.168.1.11 Trying 192.168.1.11... connected to 192.168.1.11. escape character is '^]'. red Hat Enterprise Linux Server release 6.1 (Santiago) Kernel 2.6.32-131.0.15.el6.x86 _ 64 on anx86_64 login: hongyi Password: Last login: Tue Aug 6 23:48:15 from 192.168.1.12 [hongyi @ serv01 ~] $5 telnet allows or disables access within a certain period of time (access_times, deny_time) [plain] # telnet allows or disables access within a certain period of time, which can be controlled through the access_times and deny_time parameters. For example: # access_times-# deny_time-

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.