Because to upgrade ssh, in order to prevent SSH upgrade failed to connect to the server, install Telnet service for a rainy days, after upgrading ssh and then the Telnet service is Closed.
Telnet Server Configuration
first, Install the Telnet package (typically two).
1, telnet-client (or telnet), This package is provided by the Telnet client program;
2, is the Telnet-server software package, This is the real Telnet server package!
Before installing, Check whether these packages are installed, as Follows:
[[email protected] ~] #rpm –qa |grep telnettelnet-server-0.17-38.e15
If the package is not detected and needs to be installed, the CentOS server mode has the Telnet package installed by default, but the server requires a telnet-server package.
[[email protected]/home/intone/packages] #rpm-ivh telnet-server-0.17-47.el6_3.1.x86_64.rpm
The Telnet Server package is installed on it, so let's take a look at it now.
[[email protected] ~] #rpm-qa |grep telnettelnet-0.17-47.el6_3.1.x86_64telnet-server-0.17-47.el6_3.1.x86_64
second, Start the Telnet service
1. Open Service
Edit/etc/xinetd.d/telnet
[[email protected] root]# vi /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 &nbsP; server = /usr/sbin/in.telnetd log_on_failure += USERID disable = yes }
Find disable = yes, change Yes to No and the service preset is off.
2. Activation Service
Telnet is hung under the xinetd, so it's natural to re-activate xinetd to re-read the settings in Xinetd.
[email protected] root]# Service xinetd restart
3. Set Telnet self-boot
[[email protected] root] #chkconfig telent on
third, Testing Services
By default, the system does not allow the root user to Telnet remotely. If you want to log in directly with the root user, you need to set the Following.
# echo ' pts/0 ' >>/etc/securetty# echo ' PTS/1 ' >>/etc/securetty
Restart the XINETD service to
[[email protected] root] #service xinetd Restart
Log in with normal user and root user respectively
[[email protected] root] #telnet IP
If configured correctly, you are prompted to enter the user name and password for the remote machine
Login:
Password:
If fire protection please be open, Modify firewall settings, open 23 Port Through. If the firewall is off, you do not have to do the Following.
Edit The/etc/sysconfig/iptables file and add the following line
-a input-m state--state new-m tcp-p tcp--dport 23-j ACCEPT.
Then restart the firewall
# Service Iptables Restart
Iv. Uninstall after using Telnet
1, edit/etc/xinetd.d/telnet, Find disable = no, change No to Yes.
2. Restart XINETD Service
[email protected] root]# Service xinetd restart
3. Uninstall the Telnet installation package
[[email protected] /home/intone/packages] #rpm -e telnet-serverwarning: /etc/xinetd.d/ telnet saved as /etc/xinetd.d/telnet.rpmsave[[email protected] /home/intone/packages] #cat /etc/xinetd.d/telnet.rpmsave # 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 = Yes
This article from "7231238" blog, declined reprint!
Linux Telnet service installation and configuration