【telnet】开启RHEL5.3 Linux的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 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:
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 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.
10.03.04
-- The End --
阅读(615) | 评论(0) | 转发(0) |