|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
如果您觉得本篇CentOSLinux教程讲得好,请记得点击右边漂浮的分享程序,把好文章分享给你的小伙伴们!CentOS5中完成双机rlogin、rsh无暗码通讯的一个***
===========================================================
作者:cnhtm(http://cnhtm.itpub.net)
宣布于:2010.01.1309:23
分类:一样平常分类
出处:http://cnhtm.itpub.net/post/39970/495882
---------------------------------------------------------------
在装置RAC的时分,必要设置各个节点的互信干系,使rsh、rlogin、rcp等下令不必要输出暗码能够操纵其他节点。
除依照管法rac装置文档中的***设置ssh以外,还能够经由过程修正.rhosts等文件完成互信。
在unix(如aix)中,能够复杂修正/etc/hosts.equiv完成,可是Linux中对照贫苦,必要一些其他的步调,上面演示设置***
必要在各个节点上完成以下操纵
1、反省rsh-server包是不是已装置
[root@rac1~]#rpm-qa|grep-i^rsh-server
rsh-server-0.17-40.el5假如没有装置利用rpm-ivh下令装置
2、确保/etc/xinetd.d/rlogin中存在disable=no这一行(白色局部)
[root@rac1~]#cat/etc/xinetd.d/rlogin
#default:on
#description:rlogindistheserverfortherlogin(1)program.Theserver
#providesaremoteloginfacilitywithauthenticationbasedon
#privilegedportnumbersfromtrustedhosts.
servicelogin
{
disable=no
socket_type=stream
wait=no
user=root
log_on_success+=USERID
log_on_failure+=USERID
server=/usr/sbin/in.rlogind
}3、确保/etc/xinetd.d/rsh中存在disable=no这一行(白色局部)
[root@rac1~]#cat/etc/xinetd.d/rsh
#default:on
#description:Thershdserveristheserverforthercmd(3)routineand,
#consequently,forthersh(1)program.Theserverprovides
#remoteexecutionfacilitieswithauthenticationbasedon
#privilegedportnumbersfromtrustedhosts.
serviceshell
{
disable=no
socket_type=stream
wait=no
user=root
log_on_success+=USERID
log_on_failure+=USERID
server=/usr/sbin/in.rshd
}4、重启xinetd办事
[root@rac1~]#servicexinetdrestart
Stoppingxinetd:[OK]
Startingxinetd:[OK]5、编纂/etc/securetty,确保留在rexec、rsh、rlogin三行(白色局部)
[root@rac1~]#cat/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
rexec
rsh
rlogin6、编纂/etc/hosts.equiv文件,以下所示
[root@rac1~]#cat/etc/hosts.equiv
+rac1oracle
+rac2oracle
+rac1-privoracle
+rac2-privoracle
+rac1root
+rac2root
+rac1-privroot
+rac2-privroot7、编纂/etc/hosts文件,以下所示
[root@rac1~]#cat/etc/hosts
#Donotremovethefollowingline,orvariousprograms
#thatrequirenetworkfunctionalitywillfail.
127.0.0.1localhost.localdomainlocalhost
::1localhost6.localdomain6localhost6
#public
192.168.2.101rac1.localdomainrac1
192.168.2.102rac2.localdomainrac2
#private
192.168.0.101rac1-priv.localdomainrac1-priv
192.168.0.102rac2-priv.localdomainrac2-priv
#virtual
192.168.2.111rac1-vip.localdomainrac1-vip
192.168.2.112rac2-vip.localdomainrac2-vip
8、编纂~/.rhosts,以下所示
[root@rac1~]#cat~/.rhosts
+rac1root
+rac2root
+rac1-privroot
+rac2-privroot9、测试rlogin和rsh是不是能够不必输出暗码登录其他节点
[root@rac1~]#rloginrac2
connecttoaddress192.168.2.102port543:Connectionrefused
Tryingkrb4rlogin...
connecttoaddress192.168.2.102port543:Connectionrefused
tryingnormalrlogin(/usr/bin/rlogin)
Lastlogin:WedJan1308:39:17fromrac1
[root@rac2~]#hostname
rac2.localdomain
[root@rac2~]#exit
logout
rlogin:connectionclosed.
[root@rac1~]#rshrac2
connecttoaddress192.168.2.102port543:Connectionrefused
Tryingkrb4rlogin...
connecttoaddress192.168.2.102port543:Connectionrefused
tryingnormalrlogin(/usr/bin/rlogin)
Lastlogin:WedJan1308:47:22fromrac1
[root@rac2~]#hostname
rac2.localdomain
[root@rac2~]#exit
logout
rlogin:connectionclosed.
欢迎大家来到仓酷云论坛! |
|