Home >Operation and Maintenance >Linux Operation and Maintenance >How to install telnet in linux
How to install telnet on Linux: 1. Turn off the firewall; 2. Execute the [rpm -qa |grep telnet] command to check whether the relevant software packages have been installed; 3. Execute the [yum install telnet telnet-server] command to install Just telnet.
Close the firewall:
service iptabls stop chkconfig iptabls off
1. Install telnet service
[root@rheltest1 ~]# rpm -qa |grep telnet //检查是否安装过相关软件包 telnet-0.17-47.el6.x86_64 telnet-server-0.17-47.el6.x86_64
If it is not installed, configure the YUM source and use the yum install telnet telnet-server command to install it
2. Enable the telnet service (because telnet uses clear text to transmit messages, which is not secure. Many Linux servers do not enable the telnet service by default)
Edit /etc/xinetd.d/Telnet
[root@rheltest1 ~]# vi /etc/xinetd.d/telnet //找到 disable = yes 将 yes 改成 no
3. Start the telnet service
[ root@rheltest1 ~]# service xinetd start
[root@rheltest1 ~]# chkconfig telnet on //Start the telnet service on boot
[root@rheltest1 ~]# chkconfig --list telnet //Check whether the Telnet service is on
telnet on
4. Modify the telnet service port
#vi /etc/services
Find the following content:
telnet 23/tcp
telnet 23/ udp
Change 23 to an unused port number (such as 4444), exit vi, restart the Telnet service, and the Telnet default port number will be modified.
[root@rheltest1 ~]# netstat -an |grep 4444 tcp 0 0 :::4444 :::* LISTEN
5. Test (use telnet command to connect and test under windows CMD window)
C:\Users\Administrator>telnet 192.168.1.102 4444 Red Hat Enterprise Linux Server release 6.3 (Santiago) Kernel 2.6.32-279.el6.x86_64 on an x86_64 login: rusky Password: Last login: Wed Apr 20 10:23:14 from 192.168.1.100 [rusky@rheltest1 ~]$
The above is the detailed content of How to install telnet in linux. For more information, please follow other related articles on the PHP Chinese website!