神器gpssh-exkeys

greenplum-db-4.3.8.2-build-1-RHEL5-x86_64 里面的一个命令。


Exchanges SSH public keys between hosts
<div style="background-color: inherit;">
    <span style="line-height: 1.5; background-color: inherit;"><span style="color: rgb(0, 0, 0); font-family: Arial, Verdana, sans-serif; font-size: 13px; font-style: normal; font-weight: normal; background-color: rgb(255, 255, 255);">[<font color="#0066cc">https://github.com/apache/incubator-hawq/blob/master/tools/bin/gpssh-exkeys</font>](https://github.com/apache/incubator-hawq/blob/master/tools/bin/gpssh-exkeys)</span></span>
</div>

<div style="background-color: inherit;">
    &nbsp;
</div>

<div style="background-color: inherit;">
    <div style="background-color: inherit;">
        [<font color="#0066cc">http://hdb.docs.pivotal.io/130/docs-hawq/docs-hawq-shared/utility_guide/admin_utilities/gpssh-exkeys.html</font>](http://hdb.docs.pivotal.io/130/docs-hawq/docs-hawq-shared/utility_guide/admin_utilities/gpssh-exkeys.html)
    </div>

        &nbsp;

</div>


 

新版本是hawq ssh-exkeys


http://hdb.docs.pivotal.io/211/hawq/reference/cli/admin_utilities/hawqssh-exkeys.html


 

 

 

功能:许多机器之间相互互信

https://github.com/mayou33/ssh-exkeys

 

1安装


./greenplum-db-4.3.8.2-build-1-RHEL5-x86_64.bin 


 

一路默认,yes

 

路径在 /usr/local/greenplum-db-4.3.8.2

 

##########

或者复制已经安装好的,自己单独提取命令,做个简洁版

tar -xvf gpssh-exkeys-v2.tar -C /usr/local/

 


chmod -R 777 /usr/local/greenplum-db-4.3.8.2/


#############

 

2然后执行

source /usr/local/greenplum-db-4.3.8.2/greenplum_path.sh

 

配置好所有机器的

vi /etc/hosts

比如 


192.168.184.73  test73
<div style="background-color: inherit;">
    192.168.184.74&nbsp;&nbsp;test74
</div>


 

4 在安装了greenplum-db的机器上,新增一个文件,只要写主机名 就行了

比如 vi /tmp/hosts_all

test73

test74

 

ssh互信


gpssh-exkeys –version


 

 gpssh-exkeys -f /tmp/hosts_all

 

6 卸载

 rm -rf /usr/local/greenplum-db-4.3.8.2