1、安装相应的包(client请在client文件夹下查找RPM包)

[root@localhost ~]# mount /dev/cdrom /mnt
mount: block device /dev/cdrom is write-protected, mounting read-only
[root@localhost ~]# cd mnt
-bash: cd: mnt: 没有那个文件或目录
[root@localhost ~]# cd /mnt
[root@localhost mnt]# ls
Cluster            README-te.html            RELEASE-NOTES-U5-en
ClusterStorage     README-zh_CN.html         RELEASE-NOTES-U5-en.html
EULA               README-zh_TW.html         RELEASE-NOTES-U5-es.html
eula.en_US         RELEASE-NOTES-as.html     RELEASE-NOTES-U5-fr.html
GPL                RELEASE-NOTES-bn.html     RELEASE-NOTES-U5-gu.html
p_w_picpaths             RELEASE-NOTES-de.html     RELEASE-NOTES-U5-hi.html
isolinux           RELEASE-NOTES-en          RELEASE-NOTES-U5-it.html
README-as.html     RELEASE-NOTES-en.html     RELEASE-NOTES-U5-ja.html
README-bn.html     RELEASE-NOTES-es.html     RELEASE-NOTES-U5-kn.html
README-de.html     RELEASE-NOTES-fr.html     RELEASE-NOTES-U5-ko.html
README-en          RELEASE-NOTES-gu.html     RELEASE-NOTES-U5-ml.html
README-en.html     RELEASE-NOTES-hi.html     RELEASE-NOTES-U5-mr.html
README-es.html     RELEASE-NOTES-it.html     RELEASE-NOTES-U5-or.html
README-fr.html     RELEASE-NOTES-ja.html     RELEASE-NOTES-U5-pa.html
README-gu.html     RELEASE-NOTES-kn.html     RELEASE-NOTES-U5-pt_BR.html
README-hi.html     RELEASE-NOTES-ko.html     RELEASE-NOTES-U5-ru.html
README-it.html     RELEASE-NOTES-ml.html     RELEASE-NOTES-U5-si.html
README-ja.html     RELEASE-NOTES-mr.html     RELEASE-NOTES-U5-ta.html
README-kn.html     RELEASE-NOTES-or.html     RELEASE-NOTES-U5-te.html
README-ko.html     RELEASE-NOTES-pa.html     RELEASE-NOTES-U5-zh_CN.html
README-ml.html     RELEASE-NOTES-pt_BR.html  RELEASE-NOTES-U5-zh_TW.html
README-mr.html     RELEASE-NOTES-ru.html     RELEASE-NOTES-zh_CN.html
README-or.html     RELEASE-NOTES-si.html     RELEASE-NOTES-zh_TW.html
README-pa.html     RELEASE-NOTES-ta.html     RPM-GPG-KEY-redhat-beta
README-pt_BR.html  RELEASE-NOTES-te.html     RPM-GPG-KEY-redhat-release
README-ru.html     RELEASE-NOTES-U5-as.html  Server
README-si.html     RELEASE-NOTES-U5-bn.html  TRANS.TBL
README-ta.html     RELEASE-NOTES-U5-de.html  VT
[root@localhost mnt]# cd Server/
[root@localhost Server]# rpm -ivh xinetd-2.3.14-10.el5.i386.rpm
warning: xinetd-2.3.14-10.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing...                ########################################### [100%]
        package xinetd-2.3.14-10.el5.i386 is already installed
[root@localhost Server]# rpm -ivh telnet-server-0.17-39.el5.i386.rpm
warning: telnet-server-0.17-39.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing...                ########################################### [100%]
   1:telnet-server          ########################################### [100%]

2、开启telnet

[root@localhost Server]# 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         = no
}
将"disable = yes"改为“disable = no”

3、关掉加密的程序


[root@localhost Server]# vim /etc/xinetd.d/ekrb5-telnet
# default: off
# description: The kerberized telnet server accepts only telnet sessions, \
             which use Kerberos 5 authentication and encryption.
service telnet
{
        flags           = REUSE
        socket_type     = stream
        wait            = no
        user            = root
        server          = /usr/kerberos/sbin/telnetd
        server_args     = -e
        log_on_failure  += USERID
        disable         = yes
}

4、重启服务
[root@localhost Server]# service xinetd restart
停止 xinetd:                                              [确定]
启动 xinetd:
     

5、检查相关服务状态

[root@localhost ~]# chkconfig --list | grep telnet
        ekrb5-telnet:   关闭
        krb5-telnet:    启用
        telnet:         启用

6、测试

a、使用普通账户进行测试

[root@localhost ~]# telnet 192.168.27.35
Trying 192.168.27.35...
Connected to 192.168.27.35 (192.168.27.35).
Escape character is '^]'.

    localhost.localdomain (Linux release 2.6.18-194.el5 #1 SMP Tue Mar 16 21:52:43 EDT 2010) (2)

login: wanlong
Password:
Last login: Thu Nov 25 19:52:32 from 192.168.27.35
[wanlong@localhost ~]$

 

b、使用root用户进行测试
[root@localhost ~]# telnet 192.168.27.35
Trying 192.168.27.35...
Connected to 192.168.27.35 (192.168.27.35).
Escape character is '^]'.

    localhost.localdomain (Linux release 2.6.18-194.el5 #1 SMP Tue Mar 16 21:52:43 EDT 2010) (2)

login: root
Password:

这里输入正确的用户名和密码后仍然看见下面的提示
Login incorrect
login:

显然telnet对root用户有着更高的要求。

7、解决办法——修改登陆文件securetty,主要增加要登陆的终端点
[root@localhost ~]# vi /etc/securetty
console
vc/1
vc/2
vc/3
vc/4
vc/5
vc/6
vc/7
vc/8
vc/9
vc/10
vc/11
tty1
tty2
tty3
tty4
tty5
tty6
tty7
tty8
tty9
tty10
tty11
pts/1
pts/2
pts/3
pts/4
~
[root@localhost ~]# service xinetd restart
停止 xinetd:                                              [确定]
启动 xinetd:                                              [确定]
[root@localhost ~]# telnet 192.168.27.35
Trying 192.168.27.35...
Connected to 192.168.27.35 (192.168.27.35).
Escape character is '^]'.

    localhost.localdomain (Linux release 2.6.18-194.el5 #1 SMP Tue Mar 16 21:52:43 EDT 2010) (2)

login: root
Password:
Last login: Thu Nov 25 19:59:06 from 192.168.27.32
You have new mail.
[root@localhost ~]#

如果提示Unencrypted connection refused. Goodbye.Connection closed by foreign host.
解决办法:
ekrb5-telnet是一个需要加密的telnet服务,把这个服务启动上当然就需要加密了。解决方法:将/etc /xinetd.d/ekrb5-telnet里面的disable改成=yes,再重启xinetd服务service xinetd restart
 
 
 
出现一个现象就是linux中可以telnet localhost 但是别的PC无法telnet上,一定是防火墙出了问题。
可以关闭防火墙功能service iptables stop。也可以编辑规则 vi /etc/sysconfig/iptables
在SSH后加入 
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 23 -j ACCEPT
然后重启iptables 就可以解决
 
还有一个乱码的问题

1.root用户登录(或su root);
2.vi /etc/sysconfig/i18n 
3.将内容改为
#LANG="zh_CN.UTF-8"
#SYSFONT="latarcyrheb-sun16"
LANG="zh_CN.GB18030"
LANGUAGE="zh_CN.GB18030:zh_CN.GB2312:zh_CN:en_US.UTF-8"
SUPPORTED="zh_CN.GB18030:zh_CN.GB2312:zh_CN:en_US.UTF-8"
LC_CTYPE="zh_CN.GB18030"
LC_TIME="en_US.UTF-8"
SYSFONT="latarcyrheb-sun16"
----------------------------------------------------------
1.root用户登录(或su root);
2.vi /etc/sysconfig/i18n 
3.将内容改为 
LANG="zh_CN.GB18030"
LANGUAGE="zh_CN.GB18030:zh_CN.GB2312:zh_CN"
SUPPORTED="zh_CN.GB18030:zh_CN:zh:en_US.UTF-8:en_US:en"
SYSFONT="lat0-sun16"
----------------------------------------------------------
只要修改 /etc/sysconfig/i18n
默认为: 
LANG="zh_CN.UTF-8" 
SUPPORTER="zh_CN.UTF-8:zh_CN:zh" 
SYSFONT="latarcyrheb-sun16" 
修改后: 
LANG="en_US.UTF-8" 
SUPPORTER="en_US.UTF-8:en_US:zh" 
SYSFONT="latarcyrheb-sun16" 
重启系统就ok,中文乱码变成了英文显示