【telnet】开启RHEL5.3 Linux的telnet服务

首先,不建议使用telnet方式登录Linux,但是配置telnet的方法还是要掌握的。
简单记录一下在红帽RHEL5.3上配置telnet的过程。

1.确认所需的包已经安装
[root@secDB ~]# rpm -qa | grep -i telnet
telnet-server-0.17-39.el5
telnet-0.17-39.el5

telnet是默认被安装的。
如果没有安装,可以到安装介质的光盘中找到对应的安装包,使用“rpm -ivh”命令进行安装。

2.修改telnet服务配置文件
[root@secDB ~]# 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 #将这里的“yes”修改为“no”
}
~
~

3.重启xinetd守护进程
[root@secDB ~]# service xinetd restart
Stopping xinetd:                                           [  OK  ]
Starting xinetd:                                           [  OK  ]

或使用如下的方法重启
[root@secDB ~]# /etc/init.d/xinetd restart
Stopping xinetd:                                           [  OK  ]
Starting xinetd:                                           [  OK  ]

4.设置随开机启动
[root@secDB ~]# chkconfig --add telnet
[root@secDB ~]# chkconfig telnet on

确认是否为随开机启动
[root@secDB ~]# chkconfig --list telnet
telnet          on

OK,调整完毕。

5.测试telnet登录数据库服务器
C:\>telnet 172.17.193.211
Trying 172.17.193.211...
Connected to 172.17.193.211.
Escape character is '^]'.
Red Hat Enterprise Linux Server release 5.3 (Tikanga)
Kernel 2.6.18-128.el5 on an x86_64
login: oracle
Password:
Last login: Thu Mar  4 12:38:11 from 10.142.8.207
ora10g@secDB /home/oracle$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.3.0 - Production on Thu Mar 4 12:56:13 2010

Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, Oracle Label Security, OLAP and Data Mining Scoring Engine options

sys@ora10g> select * from v$version;

BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bi
PL/SQL Release 10.2.0.3.0 - Production
CORE    10.2.0.3.0      Production
TNS for Linux: Version 10.2.0.3.0 - Production
NLSRTL Version 10.2.0.3.0 - Production

成功。

6.去除无法telnet到root用户的限制
1)默认情况下是不允许telnet到root用户的
C:\>telnet 172.17.193.211
Trying 172.17.193.211...
Connected to 172.17.193.211.
Escape character is '^]'.
Red Hat Enterprise Linux Server release 5.3 (Tikanga)
Kernel 2.6.18-128.el5 on an x86_64
login: root
Password:
Login incorrect

login:

这里不是应为密码输入错误导致的登录不进去,而是系统限制。

2)处理方法
使用mv备份的方式删除“/etc/securetty”文件
[root@secDB ~]# mv /etc/securetty /etc/securetty.bak

3)再次测试
C:\>telnet 172.17.193.211
Trying 172.17.193.211...
Connected to 172.17.193.211.
Escape character is '^]'.
Red Hat Enterprise Linux Server release 5.3 (Tikanga)
Kernel 2.6.18-128.el5 on an x86_64
login: root
Password:
Last login: Thu Mar  4 12:39:19 from 10.142.8.207
[root@secDB ~]# id
uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel),105(pkcs11)

root用户telnet登录成功。

7.小结
本文通过一个小实验给大家展示了在红帽5.3上telnet的配置方法。供参考。

Good luck.

secooler
10.03.04

-- The End --

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/519536/viewspace-628647/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/519536/viewspace-628647/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值