ITPub博客

首页 > 数据库 > Oracle > 【telnet】开启RHEL5.3 Linux的telnet服务

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

原创 Oracle 作者:OCMU联盟 时间:2010-03-04 23:32:02 0 删除 编辑
首先,不建议使用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博客 ” ,链接:https://blog.itpub.net/70034820/viewspace-2993836/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
OCM联盟( Oracle Certified Master Union)是由侯圣文(ACE总监)发起的一个公益组织,旨在为每一个OCM大师提供一个可以继续展示自己才华,技术和实力的平台。

注册时间:2007-05-27

  • 博文量
    799
  • 访问量
    8407007