1. The Telnet package is installed by default in centos 5.3.
[Root @ zhuliting ~] # Cat/etc/RedHat-release
Centos release 5.3 (final)
[Root @ zhuliting ~] # Rpm-Qa | grep Telnet
Telnet-server-0.17-39.el5
Telnet-0.17-39.el5
If not, run the following command:
[Root @ zhuliting ~] # Yum install telnet-Server
[Note] telnet-server seems to be useless, and it succeeds without it.
1. Modify the/etc/xinetd. d/krb5-telnet file:
Service telnet
{
...
Disable = Yes
}
Change the disalbe = Yes field to No.
2. Modify the/etc/PAM. d/remote file and comment out the following line:
Auth required pam_securetty.so
3. In firewall settings, set telnet to a trusted service or disable the firewall.
4. Restart the telnet service.
[Root @ zhuliting ~] # Service xinetd restart
Otherwise, the following error may occur:
1,
[Root @ zhuliting ~] # Telnet zhuliting
Trying 192.168.149.166...
TELNET: connect to address 192.168.149.183: Connection refused
TELNET: Unable to connect to remote host: Connection refused
2. [root @ zhuliting ~] # Telnet zhuliting
Trying 192.168.149.166...
Connected to zhuliting (192.168.149.183 ).
Escape Character is '^]'.
Zhuliting (Linux release 2.6.18-194.26.1.el5xen #1 SMP Tue Nov 9 14:13:46 est 2010) (5)
Login: Root
Password:
Login incorrect
Login: