亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費(fèi)注冊(cè) 查看新帖 |

Chinaunix

  平臺(tái) 論壇 博客 文庫(kù)
最近訪問(wèn)板塊 發(fā)新帖
查看: 3217 | 回復(fù): 5
打印 上一主題 下一主題

請(qǐng)問(wèn)如何實(shí)現(xiàn) ssh 無(wú)密碼登錄 [復(fù)制鏈接]

論壇徽章:
0
跳轉(zhuǎn)到指定樓層
1 [收藏(0)] [報(bào)告]
發(fā)表于 2010-03-30 14:49 |只看該作者 |倒序?yàn)g覽
本帖最后由 longbow0 于 2010-03-30 14:52 編輯

系統(tǒng)環(huán)境是這樣:

一臺(tái)超算,有 8 個(gè)結(jié)點(diǎn) ( node1~8 ),和 1 個(gè)共享的盤陣。在每個(gè)結(jié)點(diǎn)上,盤陣都被掛載為 /data

用戶的主目錄在 盤陣 上,為 /data/test

我的做法是,在 node1 上,運(yùn)行

  1. $ ssh-keygen -t rsa
復(fù)制代碼
然后在 .ssh 下,

  1. cat id_rsa.pub >> authorized_keys
復(fù)制代碼
現(xiàn)在的問(wèn)題是,無(wú)論用 rsa1, rsa, dsa 都無(wú)法實(shí)現(xiàn)無(wú)密碼登錄其他結(jié)點(diǎn)。

在各結(jié)點(diǎn)去掉 /etc/ssh/sshd_config

  1. # RSAAuthentication yes
  2. # PubkeyAuthentication yes
  3. # AuthorizedKeysFile        %h/.ssh/authorized_keys
復(fù)制代碼
的注釋,重啟 sshd 也沒(méi)有用。

請(qǐng)問(wèn)還應(yīng)該考慮哪些因素?謝謝!

論壇徽章:
0
2 [報(bào)告]
發(fā)表于 2010-03-30 15:58 |只看該作者
rac1-> mkdir ~/.ssh
rac1-> chmod 700 ~/.ssh
rac1-> ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/export/home/oracle/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /export/home/oracle/.ssh/id_rsa.
Your public key has been saved in /export/home/oracle/.ssh/id_rsa.pub.
The key fingerprint is:
87:54:4f:92:ba:ed:7b:51:5d:1d:59:5b:f9:44:da:b6 oracle@rac1.mycorpdomain.com
rac1-> ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/export/home/oracle/.ssh/id_dsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /export/home/oracle/.ssh/id_dsa.
Your public key has been saved in /export/home/oracle/.ssh/id_dsa.pub.
The key fingerprint is:
31:76:96:e6:fc:b7:25:04:fd:70:42:04:1f:fc:9a:26 oracle@rac1.mycorpdomain.com       

在 rac2 上執(zhí)行

rac2-> mkdir ~/.ssh
rac2-> chmod 700 ~/.ssh
rac2-> ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/export/home/oracle/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /export/home/oracle/.ssh/id_rsa.
Your public key has been saved in /export/home/oracle/.ssh/id_rsa.pub.
The key fingerprint is:
29:5a:35:ac:0a:03:2c:38:22:3c:95:5d:68:aa:56:66 oracle@rac2.mycorpdomain.com
rac2-> ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/export/home/oracle/.ssh/id_dsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /export/home/oracle/.ssh/id_dsa.
Your public key has been saved in /export/home/oracle/.ssh/id_dsa.pub.
The key fingerprint is:
4c:b2:5a:8d:56:0f:dc:7b:bc:e0:cd:3b:8e:b9:5c:7c oracle@rac2.mycorpdomain.com

在 rac1 上執(zhí)行

rac1-> cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
rac1-> cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
rac1-> ssh rac2 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
The authenticity of host 'rac2 (192.168.2.132)' can't be established.
RSA key fingerprint is 63:d3:52:d4:4d:e2:cb:ac:8d:4a:66:9f:f1:ab:28:1f.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'rac2,192.168.2.132' (RSA) to the list of known hosts.
oracle@rac2's password:
rac1-> ssh rac2 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
oracle@rac2's password:
rac1-> scp ~/.ssh/authorized_keys rac2:~/.ssh/authorized_keys
oracle@rac2's password:
authorized_keys                           100% 1716     1.7KB/s   00:00

論壇徽章:
0
3 [報(bào)告]
發(fā)表于 2010-03-30 16:49 |只看該作者
1/ 在每臺(tái)client上,使用者用 ssh-keygen -t dsa 做出 public key, 把 public key scp 到 ssh 服務(wù)器上. public key 在 ~/.ssh/xxx.pub
2/ 在服務(wù)器端上, 把各client 的 public key 加到名為 authorized_keys 上.
3/ 更改 ssh 服務(wù)器對(duì) auth 的相關(guān)設(shè)定, 重啟 ssh 服務(wù)器, 完成

論壇徽章:
0
4 [報(bào)告]
發(fā)表于 2010-03-30 16:52 |只看該作者
本帖最后由 longbow0 于 2010-03-30 16:54 編輯

謝謝樓上。

.ssh 目錄的屬性是 0700,我也嘗試過(guò)把 authorized_keys 的屬性改成 0644 或 0600,還是不行。

結(jié)點(diǎn)和盤陣的示意圖如下



/data/test 就是用戶 test 的 HOME 目錄。

ssh-keygen 產(chǎn)生的文件在 /data/test/.ssh/。

論壇徽章:
34
亥豬
日期:2015-03-20 13:55:11戌狗
日期:2015-03-20 13:57:01酉雞
日期:2015-03-20 14:03:56未羊
日期:2015-03-20 14:18:30子鼠
日期:2015-03-20 14:20:14丑牛
日期:2015-03-20 14:20:31辰龍
日期:2015-03-20 14:35:34巳蛇
日期:2015-03-20 14:35:56操作系統(tǒng)版塊每日發(fā)帖之星
日期:2015-11-06 06:20:00操作系統(tǒng)版塊每日發(fā)帖之星
日期:2015-11-08 06:20:00操作系統(tǒng)版塊每日發(fā)帖之星
日期:2015-11-19 06:20:00黃金圣斗士
日期:2015-11-24 10:43:13
5 [報(bào)告]
發(fā)表于 2010-03-30 17:19 |只看該作者
先把 .pub 的那個(gè)放到本機(jī)的 authorized_keys 里,登陸自己。

論壇徽章:
0
6 [報(bào)告]
發(fā)表于 2010-04-08 18:53 |只看該作者
看我的BLOG:witer666.blog.51cto.com
您需要登錄后才可以回帖 登錄 | 注冊(cè)

本版積分規(guī)則 發(fā)表回復(fù)

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號(hào)-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號(hào):11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報(bào)專區(qū)
中國(guó)互聯(lián)網(wǎng)協(xié)會(huì)會(huì)員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過(guò)ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請(qǐng)注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP