CnetOS 下搭建 ---Saltstack

本文详细介绍了在使用Salt-SSH进行远程管理时遇到主机密钥认证问题的解决方法,通过修改`/root/.ssh/config`文件设置StrictHostKeyChecking为no,成功解决了无法继续执行命令的问题。同时,展示了在CentOS 6.5环境下,使用Salt-SSH执行命令`df-h`获取磁盘使用情况的操作。

模块

1.salt-ssh

yum install salt-ssh

vim /etc/salt/roster

centos6.5-06:

  host:192.168.17.145

  user:root

  passwd:111111

      port: 22

timeout: 30

问题: salt-ssh"*" test.ping 

       The host key needs to be accepted, toauto accept run salt-ssh with the -i flag:

        Theauthenticity of host '192.168.17.145 (192.168.17.145)' can't be established.

        RSA keyfingerprint is 4c:89:e6:46:95:cf:a9:52:df:ff:bf:9d:25:93:da:f2.

        Are you sure you want to continue connecting(yes/no)?

解决方法:原因是无法输入yes命令无法继续执行

[root@bogon salt]# touch/root/.ssh/config

[root@bogon salt]# vim/root/.ssh/config

host 192.168.17.146 -------minion端ip

StrictHostKeyChecking no

 [root@bogon salt]# salt-ssh "*"cmd.run "df -h"

centos6.5-06:

   Filesystem                    Size  Used Avail Use% Mounted on

   /dev/mapper/VolGroup-lv_root  18G  3.5G   13G 22% /

   tmpfs                        495M   96K  495M  1% /dev/shm

           /dev/sda1                     485M   35M 426M   8% /boot
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值