Linux Telnet Installation configuration

Source: Internet
Author: User

This article takes the Red Hat 6.2 64-bit version as an example, other Linux similar:

Linux defaults to using the SSH service instead of the Telnet service, so you need to install Telnet manually.

1, Telnet installation package has two, respectively:

telnet-0.17-47.el6.x86_64.rpm

telnet-server-0.17-47.el6.x86_64.rpm

2. Install the Telnet package

RPM–IVH telnet-0.17-47.el6.x86_64.rpm

Install a dependency package before installing the server package: xinetd-2.3.14-33.el6.x86_64.rpm

RPM–IVH xinetd-2.3.14-33.el6.x86_64.rpm

RPM–IVH telnet-server-0.17-47.el6.x86_64.rpm

Then execute:

Rpm-qa|grep Telnet

A message appears indicating successful installation

telnet-0.17-47.el6.x86_64.rpm

telnet-server-0.17-47.el6.x86_64.rpm

3. Configure Telnet

VI Edit/etc/xinetd.d/telnet File

Change Disable = yes to disable = No (service is off by default)

4. Activating Telnet

Execute: Service xinetd Restart (restart Xinted services will automatically start Telnet)

5. Testing

Execution: Telnet 127.0.0.1

A login prompt indicates that the installation configuration was successful.

6. Set the default port

Edit vi/etc/services file Modify telnet default port

Telnet 23/tcp

Telnet 23/UDP

Execution: Service xinetd Restart restart xinted Services activation configuration

7. Restrict Telnet (no attempt, for reference)

Edit/etc/xinetd.d/telnet File


# First set up for the looser restrictions on internal: service Telnet
{

Disable = no <== preset is to activate Telnet service
bind = 210.45.160.17 <== only allow packets to come in through this adapter card
Only_from = 210.45.160.0/24 <== only allows hosts that 210.45.160.0/24 this segment to come online using Telnet service .....

}
# Restrict service Telnet {for external online
Disable = no<== preset is to activate Telnet service
Bind = 192.168.0.1<== only allows packets to come in through this adapter card
Only_from = 192.168.0.0/16<== only allow 192.168.0.0 ~ 192.168.255.255 This segment to come online using Telnet service
Only_from =. edu.cn<== Repeat settings, only education network can be online!

No_access = 192.168.25. {10,26}<== Don't allow these PCs to log in
Access_times = 1:00-9:00 20:00-23:59 <== Only these two hours a day open service ...}

8. Enable Root Login

By default, root is not allowed to log on by Telnet, the following is the method of modification

Vi/etc/pam.d/login

Auth require pam_securetty.so comment out this line

Revision changed to

#auth require pam_securetty.so

Files: http://pan.baidu.com/s/1i3qpp4p

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.