Linux defaults to using the SSH service instead of the Telnet service, so you need to install Telnet manually.
1, Telnet installation package has two, respectively:
telnet-0.17-47.el6.x86_64.rpm
telnet-server-0.17-47.el6.x86_64.rpm
2. Install the Telnet package
RPM–IVH telnet-0.17-47.el6.x86_64.rpm
Install a dependency package before installing the server package: xinetd-2.3.14-33.el6.x86_64.rpm
RPM–IVH xinetd-2.3.14-33.el6.x86_64.rpm
RPM–IVH telnet-server-0.17-47.el6.x86_64.rpm
Then execute:
Rpm-qa|grep Telnet
A message appears indicating successful installation
telnet-0.17-47.el6.x86_64.rpm
telnet-server-0.17-47.el6.x86_64.rpm
3. Configure Telnet
VI Edit/etc/xinetd.d/telnet File
Change Disable = yes to disable = No (service is off by default)
4. Activating Telnet
Execute: Service xinetd Restart (restart Xinted services will automatically start Telnet)
5. Testing
Execution: Telnet 127.0.0.1
A login prompt indicates that the installation configuration was successful.
6. Set the default port
Edit vi/etc/services file Modify telnet default port
Telnet 23/tcp
Telnet 23/UDP
Execution: Service xinetd Restart restart xinted Services activation configuration
7. Restrict Telnet (no attempt, for reference)
Edit/etc/xinetd.d/telnet File
# First set up for the looser restrictions on internal: service Telnet
{
Disable = no <== preset is to activate Telnet service
bind = 210.45.160.17 <== only allow packets to come in through this adapter card
Only_from = 210.45.160.0/24 <== only allows hosts that 210.45.160.0/24 this segment to come online using Telnet service .....
}
# Restrict service Telnet {for external online
Disable = no<== preset is to activate Telnet service
Bind = 192.168.0.1<== only allows packets to come in through this adapter card
Only_from = 192.168.0.0/16<== only allow 192.168.0.0 ~ 192.168.255.255 This segment to come online using Telnet service
Only_from =. edu.cn<== Repeat settings, only education network can be online!
No_access = 192.168.25. {10,26}<== Don't allow these PCs to log in
Access_times = 1:00-9:00 20:00-23:59 <== Only these two hours a day open service ...}
8. Enable Root Login
By default, root is not allowed to log on by Telnet, the following is the method of modification
Vi/etc/pam.d/login
Auth require pam_securetty.so comment out this line
Revision changed to
#auth require pam_securetty.so