|
I. CentOS see whether the system has been installed telnet
rpm -qa | grep telnet
telnet-0.17-48.el6.x86_64
telnet-server-0.17-48.el6.x86_64
telnet is hanging under xinetd, so at the same time to see if the service is installed xinetd
rpm -qa | grep xinetd
xinetd-2.3.14-39.el6_4.x86_64
Both are not already installed, yum install the following services
yum install xinetd telnet telnet-server -y
II. Configuring telnet
Setting the boot
#chkconfig telnet on
Modify the configuration file
vi /etc/xinetd.d/telnet
The "disable = yes" changed to "disable = no"
Third, the activation service
Restart xinetd service
service xinetd restart
Or /etc/rc.d/init.d/xinetd restart
Four .iptables firewall will prevent telnet, so it is necessary to allow iptables, use the following command
When you start the telnet service, you can use the netstat -tunlp telnet command to check the port used by the service can be found 23. Use the following command to open these ports:
iptables -I INPUT -p tcp --dport 23 -jACCEPT
iptables -I INPUT -p udp --dport 23 -jACCEPT
service iptables save // save
service iptables restart // reboot the firewall
Or to point ruthless! ! Turn off the firewall!
service iptables stop
V. using the telnet command
Format: telnet ip prot
Six other commonly used telnet command description:
close close current connection
Force Quit remote user logout and close the connection
display display parameters of the current operation
trying to enter the command line mode or character mode
open to connect to a site
quit quit
set set the parameters of the current operation
unset Resets the current operating parameters
status Print status information
toggle switching operating parameters
slc state change special characters
auth on / off function z pending confirmation
telnetsend send special characters
telnetenviron change the environment variables? Displays help information
VII. Error Resolution
If you use the telnet command has the following tips:
-bash: telnet: command not found
Check to see if the lack of installation package telnet |
|
|
|