Redhat to open the Telnet service.

Source: Internet
Author: User

First, use the RPM command to detect whether the Telnet,telnet-server RPM package is installed

[root@localhost Root] #rpm-qa telnet
<>TELNET*.RPM is installed by default
[root@localhost Root] #rpm-qa telnet-server
<> displayed as NULL, TELNET*.RPM is not installed by default

Two. Install Telnet-server
<> the required documents are stored in the 3rd CD-ROM/redhat/rpms directory, named telnet-server-0.17-25.i386.rpm

[root@localhost Root] #mount/mnt/cdrom
[root@localhost Root] #cd/mnt/cdrom//redhat/rpms
[root@localhost Root] #rpm-IVH telnet-server-0.17-25.i386.rpm

<>PS: Mount CD First, then install

Three. Modify the contents of the Telnet service configuration file
[root@localhost Root] #vi/etc/xinetd.d/telnet

Service Telnet
Flags = Reuse
Socket_type = Stream
wait = no
user = root
Server =/usr/sbin/in.telnetd
Log_on_failure + + USERID
Disable = yes

<> will disable=yes line before add #, or change to Disable=no
<>ps: After installing Telnet-server, the system only has files/usr/sbin/in.telnetd

Four. Restart the xinetd daemon

Because the Telnet service is also guarded by xinetd, the telnet-server must be restarted to start the Telnet service when the installation is complete xinetd
[root@localhost Root] #service xinetd restart
[Root@localhost root]#/etc/init.d/xinetd Restart

Five. Shut down the system firewall

Linux system default firewall is "high"

Command-line Interface CLI:
[Root@localhost root]# Setup
Choice: "Firewall Configuration"
Option: Security level-"no firewall"

Six. Test

Connect a redhat9 machine with Telnet service installed in another machine
Telnet IP

<> appears
Red Hat Linux Release 9 (shrike)
Kernel 2.4.20-8 on a i686
<> above indicates connection OK
<>ps: At this time can not directly with the root user remote login, you may first log in with other users, and then use the SU command to switch

Seven. Telnet default boot up

1. Command NTSYSV
[Root@localhost Root] #ntsysv
Locate Telnet, activate (*) Telnet service with the space key
2. Command Chkconfig
[root@localhost Root] #chkconfig--add telnet
[root@localhost Root] #chkconfig telnet on
3. GUI for graphical user interface
1). [root@localhost Root] #redhat-config-services
2). or click "Main menu"/"System Settings"/"Server Settings"/"Services"

Eight. Set Telnet port #vi/etc/services
Look for Telnet after entering edit mode (vi edit mode input/telnet)
Will find the following:
Telnet 23/tcp
Telnet 23/UDP
Change 23 to unused port number (e.g. 2000), exit VI, restart Telnet service, and the Telnet default port number is modified.

Ix. Telnet Service Limits Telnet is the plaintext transmission of passwords and data, if you are not satisfied with its default settings, it is necessary to limit the scope of its services. Assume that your host IP is, you can set the following way, ^_^!
Service Telnet
Disable = no #激活 telnet service, no
bind = #your IP
Only_from = #只允许 ~ This network segment enters
Only_from =. #只有教育网才能进入.
No_access = 210.45.160. {115,116} #这两个ip不可登陆
access_times= 8:00-12:00 20:00-23:59 # Only two hours a day open the service

Ten, Telnet root user Login
Telnet is not very secure, and the default is not to allow root to telnet into the Linux host. To allow root users to log in, you can use the following methods:
[Root @wljs/root]# Vi/etc/pam.d/login
#auth Required #将这一行加上注释.
[Root@wljs root]# Mv/etc/securetty/etc/securetty.bak
This way, root can go directly to the Linux host. However, it is not recommended to do so. You can also switch to root after the average user enters and have root privileges.

Turn from:

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: 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.