国产又粗又猛又大的视频在线播放_精品国产一区二区日韩91_日韩成人成色在线观看_日韩毛片一二三区_打扑克牌又疼又叫软件下载_欧美激情综合色综合啪啪五月_国产精品激情自拍系列_麻豆国产在线视频_fc2成人免费人成在线观看播放_那里可以免费看毛片

跳轉(zhuǎn)到主要內(nèi)容

Linux集群SSH免密登陸

分類
故障描述

  無

故障分析

  無

處理過程

      Linux集群規(guī)模20臺,需相互間免密登陸。

      先選擇一臺主機保存所有主機的密鑰,然后將密鑰復(fù)制到所有主機。

1.登陸每臺主機創(chuàng)建ssh.pub:

[root@master-1 ~]# ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa
Your public key has been saved in /root/.ssh/id_rsa.pub
The key fingerprint is:
SHA256:Z0rzrrX1DA+Yjw6S9iFnoGQfQc9NVn1PXEXHohC/gno root@jumpserver
The key's randomart image is:
+---[RSA 3072]----+
|      .   +o.. +B|
|     . o +..  o *|
|      . o .... +.|
|       . .  ..  .|
|    o o S + .    |
|   o o * * +     |
|    . B E = +    |
|     . B = = *   |
|        oo= . +  |
+----[SHA256]-----+

 

2. 每臺主機執(zhí)行ssh-copy-id root@master-1復(fù)制到Master-1

3.登陸Master-1將密碼復(fù)制到所有主機:

scp .ssh/authorized_keys root@master-2:/root/ssh.txt

scp .ssh/authorized_keys root@master-3:/root/ssh.txt

scp .ssh/authorized_keys root@node-1:/root/ssh.txt

....

4.登陸每臺主機,將ssh.txt追加到.ssh/authorized_keys即可。

cat /root/ssh.txt >> /root/.ssh/authorized_keys

建議/總結(jié)

  無