Failed to telnet to Red Hat Linux on the VM-Solution

Source: Internet
Author: User

The error is as follows:

Telent 192.168.141.123
Connecting to 192.168.141.123... the connection to the host cannot be opened. port 23: Connection Failed

Cause of failure:
1. Telnet package Not Installed
Check whether the Telnet package is installed
[Root @ localhost root] # rpm-Qa Telnet
Telnet-0.17-25
Indicates that you have installed

2. The Telnet package is installed, but the telnet server is not installed.
Check whether the telnet server is installed
[Root @ localhost root] # rpm-Qa telnet-Server
Telnet-server-0.17-25
Indicates that you have installed

If the telnet server is not installed, install the following::
1) load the third image disc of the system
2) mount Mount/dev/CDROM/mnt/CDROM
3) Find the telnet-server-0.17-25.i386.rpm (CD/mnt/CDROM/RedHat/RPMS)
4) install the RPM package
[Root @ localhost RPMs] # rpm-IVH telnet-server-0.17-25.i386.rpm
Warning: telnet-server-0.17-25.i386.rpm: V3 DSA Signature: nokey, key ID db42a60e
Preparing... ######################################## ### [100%]
1: telnet-server ##################################### ###### [100%]
[Root @ localhost RPMs] # rpm-Qa telnet-Server
Telnet-server-0.17-25

 

3. The Disable In the Telnet file is yes.
Change the value of disable to no or comment to change the line, and restart the xinetd daemon (Service xinetd restart)
[Root @ localhost root] # Cat/etc/xinetd. d/telnet
# Default: On
# Description: the telnet server serves Telnet sessions; it uses \
# Unencrypted username/password pairs for authentication.
Service telnet
{
Flags = Reuse
Socket_type = stream
Wait = No
User = root
Server =/usr/sbin/in. telnetd
Log_on_failure + = userid
Disable = No
}

The telnet file is available only after the telnet server is installed.

4. Firewall reasons: Linux Local Firewall
If the firewall is disabled, you do not need to add the row in the/etc/sysconfig/iptables file:-A RH-Firewall-1-INPUT-M state -- state new-m tcp-p tcp -- dport 23-J accept

Disable Firewall
Service iptables stop
It will expire after restart
To restart or disable the Firewall
Service iptables stop
Chkconfig iptables off

Note:
1. Firewall Configuration File:/etc/sysconfig/iptables
2. Start the Firewall Service: Service iptables start
3. Restart the Firewall Service: Service iptables restart
4. Disable the Firewall Service: Service iptables stop
5. By default, the root user cannot be used for telnet.
Solution 1: Modify the/etc/PAM. d/login file and comment out the auth required pam_securetty.so line.
Solution 2: log on with a common user and then switch to the root user

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