说明

ssh_trust工具为企业自动化,建立互信功能而优化的。
可以自动补建/etc/hosts信息,以及为多节点提供用户互信。操作更简单

操作前提条件:
1、linux操作系统
2、需要安装sshpass包,ZCBUS提供下载驱动如下

    wget http://101.201.81.45:8888/ZCBUS/zcsoft/aux/sshpass-1.06-2.el7.x86_64.rpm

3、下载ssh_trust工具

    wget http://101.201.81.45:8888/ZCBUS/zcsoft/aux/ssh_trust

工具使用方式:

[zcbus@db00 ssh]$ ./ssh_trust -h
Linux db00 3.10.0-1127.el7.x86_64 #1 SMP Tue Mar 31 23:36:51 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
ssh_trust: Release 7.6 64 bit (QA) - Production on 2021-04-07 17:22:45
Copyright (c) 2021 ZCBUS. All Rights Reserved.
process id 2035
ssh mutual trust tool.

Usage: ./ssh_trust trust.ini [options]
-h help
-print print parameter in trust.ini and exit,
if not set trust.ini, print sample trust.ini
-modify_hosts auto modify /etc/hosts to add new host info

Examples:
./ssh_trust trust.ini
./ssh_trust trust.ini -print
./ssh_trust -print

[zcbus@db00 ssh]$

trust.ini格式如下

[zcbus@db00 ssh]$ ./ssh_trust  -print
[host1]
name=db01
host=10.105.1.100
port=22
user=root
password=1234

[host2]
name=db02
host=10.105.1.101
port=22
user=root
password=1234

[host3]
name=db03
host=10.105.1.102
port=22
user=root
password=1234

password特殊字符说明

密码中含有 ' 英文格式单引号的不支持

ssh_trust使用方式

[zcbus@db00 ssh]$ ./ssh_trust trust.ini
就可以。

文档更新时间: 2022-12-01 21:49   作者:阿力