Install and use the telnet command in CentOS 6. x

Source: Internet
Author: User

Install and use the telnet command in CentOS 6. x

1. Check whether telnet is installed in the CentOS system.
Rpm-qa | grep telnet
Telnet-0.17-48.el6.x86_64
Telnet-server-0.17-48.el6.x86_64

Telnet is mounted under xinetd, so check whether the xinetd service is installed.
Rpm-qa | grep xinetd
Xinetd-2.3.14-39.el6_4.x86_64

If neither of them is installed, yum installs the following services
Yum install xinetd telnet-server-y

2. Configure telnet
 
Set startup
# Chkconfig telnet on

Modify configuration file
Vi/etc/xinetd. d/telnet
Change "disable = yes" to "disable = no"

3. Activate the service
Restart the xinetd service
Service xinetd restart
Or/etc/rc. d/init. d/xinetd restart

4. the iptables firewall will block telnet, so you need to allow it in iptables by using the following command:
After you start the telnet service, you can run the netstat-tunlp command to view the port used by the telnet service. The port number is 23. Run the following command to enable 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 // restart the Firewall
Or click it !! Disable firewall!
Service iptables stop

5. Use the telnet command
Format: telnet ip prot

6. Other common telnet commands:
Close current connection
Logout forces the remote user to exit and close the connection
Display parameters of the current operation
Mode tries to enter the command line mode or Character mode
Open connection to a site
Quit exit
Set sets the parameters of the current operation.
Unset reset current operation parameters
Status
Toggle switches operation parameters
Slc changes the status of special characters
Auth enable/disable validation Function z Suspension
Telnetsend sends special characters
How does telnetenviron change the environment variable? Show Help Information

VII. troubleshooting
If you use the telnet command, the following prompt is displayed:
-Bash: telnet: command not found
Check whether the telnet package is missing

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.