The telnet protocol is a member of the TCP/IP protocol family and is the standard protocol and main method of the Internet remote login service. It provides users with the ability to complete remote host work on local computers. Use the telnet program on the terminal user's computer to connect to the server.
1. Check whether the RPM package of telnet-server is installed
OS: redhat9
[Root @ locahost ~] # Rpm-Qa telnet-Server
// For security considerations, the telnet-server.rpm is not installed by default, and the Telnet client is standard. That is, the following software is installed by default. To facilitate the test, check it //
[Root @ locahost ~] # Rpm-Qa Telnet
Telnet-0.17-25
If not, install telnet-Server
There is a telnet-server-0.17-25.i386.rpm on the 3rd disks, go to the server directory to execute
[Root @ locahost ~] # Rpm-IVH telnet-server *. i386.rpm
2. Restart the xinetd daemon
Because the telnet service is also protected by xinetd, after the telnet-server is installed, the xinetd must be restarted to start the telnet service.
[Root @ locahost ~] # Service xinetd restart
Iii. Test
Let's first check whether TCP port 23 is enabled normally.
[Root @ locahost ~] # Netstat-tnl | grep 23
TCP 0 0 0.0.0.0: 23 0.0.0.0: * listen
If the preceding row exists, the service is running.
At this time, we can further confirm the Local Machine
[Root @ locahost ~] # Telnet localhost 23
Trying Telnet 127.0.0.1...
Connected to localhost. localdomain (127.0.0.1 )..
Escape Character is '^]'.
Red Hat Linux release 9 (Shrike)
Kernel 2.4.20-8 on an i686
Login:
If the netstat command does not return content, we have to continue with more in-depth configuration.
4. eliminate possible problems
Modify the telnet service configuration file
VI/etc/xinetd. d/telnet
Service telnet
{
Disable = Yes
Flags = Reuse
Socket_type = stream
Wait = No
User = root
Server =/usr/sbin/in. telnetd
Log_on_failure + = userid
}
Add # comment out the disable = Yes line, or change Yes to No. Then restart the xinetd daemon.
[Root @ localhost ~] # Service xinetd restart
Stop xinetd: [OK]
Start xinetd: [OK]
Disable the system firewall's limit on port 23.
[Root @ localhost ~] # System-config-securitylevel
You can enable or disable the firewall or configure the firewall.
Or:
[Root @ locahost ~] # Setup
Connection refused
It is possible that the service is not enabled, and the firewall may disable the port.
Troubleshoot the problem by yourself.
For more information, see
Http://blog.csdn.net/CenturyMagus/archive/2007/09/12/1782819.aspx
Http://topic.csdn.net/u/20090520/16/496930da-cd37-485e-a5ee-2e4303e1bc98.html