ansible批量验证密码

author: headsen chen

date: 2018-08-31  20:45:49

综合比较salt-ssh,ansible .sshpass等批量验证100台机器的密码,最好推荐用ansible,步骤如下:

1,安装ansible 

     yum -y install epel-release
     yum -y install ansible

2, 配置ansible的hosts文件 

   vim /etc/ansible/hosts  

    [group1]
    10.0.0.1
    10.0.0.2
    10.0.0.3
    10.0.0.4
    10.0.0.5
    ...

3,开始验证密码:

  ansible  new -m raw -a 'date' -k

SSH password:

猜你喜欢

转载自www.cnblogs.com/kaishirenshi/p/9568243.html