首先,搜索是否安装了telnet相关软件

rpm -qa | grep telnet*

显示结果:

[root@localhost ~]# rpm -qa | grep telnet*
telnet-0.17-39.el5
telnet-server-0.17-39.el5

注意:主要查看telnet-server是否安装。

接下来,查看telnet软件的安装路径:

rpm -ql telnet

rpm -ql telnet-server

显示结果:

[root@localhost ~]# rpm -ql telnet
/usr/bin/telnet
/usr/share/man/man1/telnet.1.gz

[root@localhost ~]# rpm -ql telnet-server
/etc/xinetd.d/telnet
/usr/sbin/in.telnetd
/usr/share/man/man5/issue.net.5.gz
/usr/share/man/man8/in.telnetd.8.gz
/usr/share/man/man8/telnetd.8.gz

最后一步,要想启动telnet服务,必须首先开启服务,而系统安装后默认情况下是关闭该服务的。如何开启该服务呢?

[root@localhost ~]# vi /etc/xinetd.d/telnet

# default: on
# description: The telnet server serves telnet sessions; it uses \
#       unencrypted username/password pairs for authentication.
service telnet
{
        flags           = REUSE
        socket_type     = stream
        wait            = no
        user            = root
        server          = /usr/sbin/in.telnetd
        log_on_failure  += USERID
        disable         = yes

}
将最后一句disable=yes 改为disable=no即可。

现在,就可以启动该服务了:

[root@localhost ~]# service xinetd status
xinetd 已停
[root@localhost ~]# service xinetd start
启动 xinetd:[确定]
[root@localhost ~]# service xinetd status
xinetd (pid  20178) 正在运行...