配置SSH的對等性

在所有節點配置SSH的對等性

在安裝Oracle Real Application clusters之前,必須先配置所有節點的SSH對等性。因爲在安裝過程種Oracle Universal Installer 使用ssh和scp命令執行遠程命令執行及copy的工作。
下面是具體的步驟:
以下步驟在所有節點上執行:
1.以oracle用戶登陸
# su – oracle
2.在兩個節點的oracle主目錄分別創建.ssh目錄,並賦予權限。
# mkdir ~/.ssh
# chmod 755 ~/.ssh
3. 在兩個節點分別生成RSA key
# /usr/bin/ssh-keygen -t rsa
會出現如下提示:
■ Accept the default location for the key file.
■ Enter and confirm a pass phrase that is different from the oracle user’s password. phrase
密碼處直接回車即可
4. 生成DSA key
# /usr/bin/ssh-keygen -t dsa
出現如下提示:
■ Accept the default location for the key file.
■ Enter and confirm a pass phrase that is different from the oracle user’s password. phrase
密碼處直接回車即可
5. 以oracle用戶身份,在所有節點創建authorized_keys文件,並賦予權限
# touch ~/.ssh/authorized_keys
# cd ~/.ssh
# ls
你應該可以看到你所創建的id_dsa.pub 和id_rsa.pub和authorized_keys
6.在兩個節點分別將id_dsa.pub 和id_rsa.pub加入到authorized_keys
節點1:
$ ssh node1 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
$ ssh node1 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
$ ssh node2 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
$ ssh node2 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
節點2:
$ ssh node2 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
$ ssh node2 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
$ ssh node1

注意要點:

.ssh目錄權限必須爲755

rsa_id.pub 及authorized_keys權限必須爲644
rsa_id權限必須爲600

用戶目錄權限爲 755 或者 700就是不能是77x

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章