CentOS5中實現雙機rlogin、rsh無密碼通訊的一個方法
在安裝RAC的時候,需要配置各個節點的互信關係,使rsh、rlogin、rcp等命令不需要輸入密碼可以操作其他節點。
除了按照管法rac安裝文件中的方法配置ssh之外,還可以透過修改.rhosts等檔案實現互信。
在unix(如aix)中,可以簡單修改/etc/hosts.equiv實現,但是Linux中比較麻煩,需要一些其他的步驟,下面演示配置方法
需要在各個節點上完成如下操作
[@more@]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: rlogind is the server for the rlogin(1) program. The server # provides a remote login facility with authentication based on # privileged port numbers from trusted hosts. service login { 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: The rshd server is the server for the rcmd(3) routine and, # consequently, for the rsh(1) program. The server provides # remote execution facilities with authentication based on # privileged port numbers from trusted hosts. service shell { 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 ~]# service xinetd restart Stopping xinetd: [ OK ] Starting xinetd: [ 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 rlogin |
6、編輯/etc/hosts.equiv檔案,如下所示
[root@rac1 ~]# cat /etc/hosts.equiv +rac1 oracle +rac2 oracle +rac1-priv oracle +rac2-priv oracle +rac1 root +rac2 root +rac1-priv root +rac2-priv root |
7、編輯/etc/hosts檔案,如下所示
[root@rac1 ~]# cat /etc/hosts # Do not remove the following line, or various programs # that require network functionality will fail. 127.0.0.1 localhost.localdomain localhost ::1 localhost6.localdomain6 localhost6 #public 192.168.2.101 rac1.localdomain rac1 192.168.2.102 rac2.localdomain rac2 #private 192.168.0.101 rac1-priv.localdomain rac1-priv 192.168.0.102 rac2-priv.localdomain rac2-priv #virtual 192.168.2.111 rac1-vip.localdomain rac1-vip 192.168.2.112 rac2-vip.localdomain rac2-vip |
8、編輯~/.rhosts,如下所示
[root@rac1 ~]# cat ~/.rhosts +rac1 root +rac2 root +rac1-priv root +rac2-priv root |
9、測試rlogin和rsh是否可以不用輸入密碼登入其他節點
[root@rac1 ~]# rlogin rac2 connect to address 192.168.2.102 port 543: Connection refused Trying krb4 rlogin... connect to address 192.168.2.102 port 543: Connection refused trying normal rlogin (/usr/bin/rlogin) Last login: Wed Jan 13 08:39:17 from rac1 [root@rac2 ~]# hostname rac2.localdomain [root@rac2 ~]# exit logout rlogin: connection closed. [root@rac1 ~]# rsh rac2 connect to address 192.168.2.102 port 543: Connection refused Trying krb4 rlogin... connect to address 192.168.2.102 port 543: Connection refused trying normal rlogin (/usr/bin/rlogin) Last login: Wed Jan 13 08:47:22 from rac1 [root@rac2 ~]# hostname rac2.localdomain [root@rac2 ~]# exit logout rlogin: connection closed. |
--end--
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/22049049/viewspace-1030522/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 一個PHP通用隨機密碼的實現PHP隨機密碼
- 除錯 rsh, rcp, rlogin, rdist 許可被拒(Permission Denied )問題(zt)除錯
- ssh-keygen & ssh-copy-id實現兩去臺linux機器之間無密碼通訊Linux密碼
- Android中通過Messenger與Service實現程式間雙向通訊AndroidMessenger
- Oracle 11g通過wallet實現無密碼登入Oracle密碼
- 在centos 5上如何配置rsh,rcp,scp多節點互通_無須密碼CentOS密碼
- 實現兩個視窗通訊方法之postMessage
- 【無線安全實踐入門】破解WiFi密碼的多個方法WiFi密碼
- 實現多個標籤頁之間通訊的幾種方法
- 如何實現 SSH 無密碼登入密碼
- 【科普一下】量子密碼就是量子通訊?密碼
- [SSH服務]——一個SSH無密碼登陸實驗密碼
- 如何動手實現一個自定義的通訊協議?協議
- 在同一個Activity下實現兩個Fragment之間的通訊Fragment
- 小米路由器配合微信實現無需密碼連線wifi的方法路由器密碼WiFi
- 如何得到一個隨機密碼隨機密碼
- xmpp實現的即時通訊聊天(一)
- 兩個有名管道實現qq通訊
- 兩個視窗如何實現通訊
- JAVA通訊(二)——實現客戶機和伺服器通訊Java伺服器
- 用XMLHTTP實現無重新整理的與server通訊XMLHTTPServer
- 修改ORACLE使用者密碼的一個方法:Oracle密碼
- 兩個 Node.js 程式如何在h5直播原始碼中實現通訊?Node.jsH5原始碼
- 在 Flutter 中實現一個無限輪播Flutter
- 在如何實現兩個JBoss之間的訊息通訊?
- 前端中的通訊(一)前端
- 程式間的通訊實現(IPC)的11種方法 (轉)
- Vue 中實現雙向繫結的 4 種方法Vue
- bridge網路實現多個單主機進行通訊
- 基於DotNetty實現一個介面自動釋出工具 - 通訊實現Netty
- 從0到1實現一個模組間通訊的服務元件元件
- websocket+node實現一個最簡單的即時通訊功能Web
- 配置雙機ssh免密碼登入密碼
- iOS實現XMPP通訊(一)搭建OpenfireiOS
- 網站密碼顯隱功能實現視訊網站密碼
- 基於 socket.io 快速實現一個實時通訊應用
- 華為通訊裝置密碼設定密碼
- mysql通訊協議的半雙工機制理解MySql協議