Solution to telnet failure

Source: Internet
Author: User

When we perform some network and device management, we suddenly find that we cannot telnet the server. I believe this is a headache and a headache for everyone. Is it still impossible to solve the problem? This article will show you how to find out. The author uses FedCore 4 (2.6.11) as the blueprint. Generally, the system's default root user cannot telnet the server or remote ftp.

1) Solve the Problem of root User ftp login

In general, ftp does not allow the root user to log on remotely for various reasons, but you can log on as long as you modify the file.

A. Remove or comment out the root in/etc/vsftpd/ftpusers.

B. Remove or comment out the root in/etc/vsftpd/user_list.

2) modify the default ftp path

My hard disk space is limited. How can I change the default ftp path/var/ftp of my account to another place? Or, all my linux directories are placed in the/root partition. Due to space shortage, can I put the default path of the ftp user to another partition? Yes, you should do the following!

First, delete the ftp user.

# Userdel-r ftp

There will be error messages, but ignore them. This is normal.

Then we add this user. For example, if I want to set the Home Directory of the ftp account to/mnt/LinG/ftp, we can perform the following operations:

[Root @ linuxsir001 root] # mkdir/root/ftp

[Root @ linuxsir001 root] # adduser-d/root/ftp-g ftp-s/sbin/nologin ftp

This alone cannot solve the problem of not being able to telnet the server, because it still does not allow anonymous users to find its home directory, so we must change the permission of the/mnt/LinG/ftp directory.

[Root @ linuxsir001 root] # chmod 755/root/ftp/

[Root @ linuxsir001 root] # chown-R root. root/ftp/

3), the root user login telnet Function

A. Check whether the telnet server is installed on your server.

Rpm-qa | grep telnet-server [root @ fedorasvr tmp] # ls

Telnet-server-0.17-35.i386.rpm

[Root @ fedorasvr tmp] # rpm-I telnet-server-0.17-35.i386.rpm

Warning: telnet-server-0.17-35.i386.rpm: Header V3 DSA signature: NOKEY, key ID 4f2a6fd2

Error: Failed dependencies:

Xinetd is needed by telnet-server-0.17-35.i386

Check, check may be not installed xinetd, because the linux installation package dependency can be strong, good to install it, in the security 1.rpm-ivh xinetd-2.3.13-6.i386.rpm

2. service xinetd start

3. rps-ivh telnet-server-0.17-35.i386.rpm

4. chkconfigtelneton

Install telnet-server, etc.

The telnet server has been installed,

B) enable the telnet function for the root user.

1. Edit the/etc/default/login file.

Added: CONSOLE =/dev/console

2. Edit the/etc/securetty file and add the following lines:

Pts/0

Pts/1

Pts/2

Pts/3

Test that the root user has successfully logged on via telnet. Now the problem of not being able to telnet the server is finally solved. Note: It is recommended that you do not use the root user telnet to log on, or use the telnet function, because it is too insecure. It is best to use ssh2 to log on.

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.