Suse and Linux Telnet service configuration

Source: Internet
Author: User

The simplest way to remotely control the Linux operating system is to use the telnet service to log on,

Then, you can execute some column operations, such as the VI editor. For SuSE Linux, add one more

You can use Telnet to log on to the system to implement a management platform YaST control center similar to the graphic interface,

YaST can be used to manage almost all functions of SuSE Linux. Next we will discuss SuSE Linux

Enterprise Server 9 provides a detailed description of the addition of the Telnet service and YaST management,

I also reproduced a general telnet configuration method for other Linux systems.

SuSE Linux Enterprise Server 9 (64bit) has been automatically installed

With the telnet service, you only need to modify the configuration file to use the service. If you use

Install the telnet service RPM package for SuSE Linux Enterprise Server 9 (32bit)


RPM package installation method:

Rpm-IVH telnet-server-1.1-38.i586.rpm // run RPM installation in Shell Environment

Command, the system automatically starts the YaST Management Program, and then enters the CD as prompted to complete the Telnet

Service installation.
Start Telnet services: // start the Telnet Service
VI/etc/xinetd. d/telnet // modify the service configuration file (SuSE Linux Enterprise

Server 9 (64bit) only needs to modify this configuration file)

The configuration file is as follows:

/Etc/xinetd. d/telnet
# Default: Off
# Description: telnet is the old Login server which is insecure and

# Therefore not be used. Use Secure Shell (openssh ).
# If you need telnetd not to "keep-alives" (e.g. If it runs

Over a ISDN/
# Uplink), add "-n". See 'man telnetd' for more details.
Service telnet
Socket_type = stream
Protocol = TCP
Wait = No
User = root
Server =/usr/sbin/in. telnetd
Disable = No

Set disable = Yes ---> disable = No // to allow the system to start the service.

Chkconfig telnet on // check whether the service is normal
/Etc/init. d/xinetd restart // restart the xinetd service
Change telnet port? // Change the telnet service port for security reasons
VI/etc/services // edit the services configuration file
Search "Telnet" and change UDP & TCP ports: 23 to 11123. // change the server

Service port
/Etc/init. d/xinetd restart // restart the xinetd service
For the sake of security, the root user is not allowed to directly Telnet the system by default.

After common users telnet into the system, they can use the su command to improve their permissions (this is recommended ).
However, if you want to log on directly with the root user, there is also a solution:

For root user can use Telnet? // Keep the root user straight

Connect to telnet
VI/etc/PAM. d/login // Edit

Series/etc/PAM. d/login file
# Auth required/lib/security/ // comment out this line
And rename "/etc/securetty", securetty. Bak // rename the security file (

You can restore it when you want to use it later)
After completing these tasks, you must go to the YaST system> runleveleditor Management page.

Set xinetd to enabled so that the system will automatically start the service the next time it restarts,

The default xinetd is diabled! See:

For other Linux operating systems, here we reference an article written by someone else. You can study it as follows:
First. 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 @ wljs root] # rpm-Q telnet or [root @ wljs root] # rpm-Q


[Root @ wljs root] # rpm-Q telnet-Server

If no software package is detected, install it. By default, telnet is installed in Red Hat Linux 9.

Install the telnet-server software package.

1. Get telnet-server-0.17-25.i386.rpm software on the Red Hat Linux 9 installation disk


2. install the software package

[Root @ wljs root] # rpm-I telnet-server-0.17-25.i386.rpm

Second. 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 @ wljs root] # vi/etc/xinetd. d/telnet

Find disable = yes and change Yes to No.

2. Activate the service

[Root @ wljs root] # service xinetd restart

Third. Test services

[Root @ wljs 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.

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

Change 23 to an unused port number (for example, 2000), exit VI, restart the telnet service, and telnet

The port number is modified.

Fifth. Telnet service restrictions

Telnet is a plaintext transmission password and data. If you are not satisfied with the default settings, you need

Limits the scope of services. Assume that the IP address of your host is

Yes, ^ _ ^!

# Vi/etc/xinetd. d/telnet

Service telnet


Disable = No # activate the telnet service, no

Bind = # Your IP

Only_from = # Only ~ is allowed ~ 210.45.0000255

CIDR block entry

Only_from = # Only CERNET can access!

No_access = 210.45.160. {115,116} # these two IP addresses cannot be logged on

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



Sixth. login from telnet Root User

Telnet is not safe. By default, the root user is not allowed to telnet to the Linux master.

Machine. To allow the root user to log on, use the following methods:

[Root @ wljs/root] # vi/etc/PAM. d/login

# Auth required # Add comments to this line!


[Root @ wljs 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. Yes.

After a common user enters, the system switches to the root user and has the root permission.


This article from the csdn blog, reproduced please indicate the source:

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.