Set the Telnet method in Linux

Source: Internet
Author: User
Article Title: Set the Telnet method in Linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

  1. Install the Telnet package (usually two)

1. Telnet-client (or Telnet). This package provides the Telnet client program;

2. Telnet-server. This package provides Telnet server programs;

Check whether these software packages are installed before installation. The method is as follows:

[Root @ echo root] # rpm? Q Telnet

[Root @ wljs root] # rpm? Q Telnet-client

[Root @ echo root] # rpm? Q Telnet-server

If no software package is detected, install it. By default, the Telnet software package is installed in red hat Linux 9. Generally, you only need to install the Telnet-server software package.

1. Get the Telnet-server-0.17-25.i386.rpm package from installation disk 3 of red hat Linux 9.

2. install the software package

[Root @ echo root] # rpm? I Telnet-server-0.17-25.i386.rpm

  Ii. Start the Telnet Service

1. Start the service

Method 1: Use ntsysv to add * Before Telnet in the displayed window, and then press OK.

Method 2: edit/etc/xinetd. d/Telnet

[Root @ echo root] # vi/etc/xinetd. d/Telnet

Find disable = yes and change yes to no.

2. Activate the service

[Root @ echo root] # service xinetd restart

  Iii. Test services

[Root @ echo root] # Telnet ip (or hostname)

If the configuration is correct, the system prompts you to enter the user name and password of the remote machine.



Note: Only common users are allowed by default.

  4. Set the Telnet port

# Vi/etc/services

Go to edit mode and find Telnet (input/Telnet in vi editing mode)

The following content is found:

Telnet 23/tcp

Telnet 23/udp

Modify 23 to an unused port number (for example, 2000), exit vi, restart the Telnet service, and modify the default port number for Telnet.

  V. Telnet service restrictions

Telnet is a plaintext transmission password and data. If you are not satisfied with the default settings, You need to restrict the service scope. Assume that the ip address of your host is

# Vi/etc/xinetd. d/Telnet

Service Telnet


Disable = no # activate the Telnet service, no

Bind = # your ip

Only_from = # Only ~ is allowed ~

Only_from = # Only CERNET can access!

No_access = 210.45.160. # these two ip addresses cannot be logged on.

Access_times =--# The service is only available for these two periods of time every day.



  Vi. login from Telnet root User

Telnet is not very secure. By default, root is not allowed to Telnet to Linux/"target = _ blank> Linux host. To allow the root user to log on, use the following methods:

[Root @ echo/root] # vi/etc/pam. d/login

# Auth required # Add comments to this line!


[Root @ echo root] # mv/etc/securetty. bak

In this way, the root user can directly access the Linux host. However, we recommend that you do not do this. You can also switch to the root user after a common user enters, with the root permission.

Note: Do not install the Telnet server in my FC4, because there is already a krb5-Telnet. Go directly to step 2

Vi/etc/xinetd. d/krb5-Telnet.

Related Article

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.