做安防在哪个网站做广告呢,长春网站制作都找源晟27,wordpress 托管,绍兴高端网站设计什么情况下才使用salt-ssh#xff0c;有一些比较老的红帽服务器#xff0c;也有一些不方便安装salt-minion客户端。总会有一些服务器比较难安装上salt-minion的。好了#xff0c;下面来说说简单配置默认使用roster配置文件vim /etc/salt/roster # Sample salt-ssh config fi… 什么情况下才使用salt-ssh有一些比较老的红帽服务器也有一些不方便安装salt-minion客户端。总会有一些服务器比较难安装上salt-minion的。好了下面来说说简单配置默认使用roster配置文件vim /etc/salt/roster # Sample salt-ssh config file
#web1:
# host: 192.168.42.1 # The IP addr or DNS hostname
# user: fred # Remote executions will be executed as user fred
# passwd: foobarbaz # The password to use for login, if omitted, keys are used
# sudo: True # Whether to sudo to root, not enabled by default
#web2:
# host: 192.168.42.2
hdd: //ID名字可以随便定义host: 10.0.0.221user: hddpasswd: 66666sudo: Ture已经完成配置下面直接使用salt-ssh第一次运行没有添加-i未能如期运行。rootsalt-master ~]# salt-ssh * -r free -m
hdd:----------retcode:254stderr:stdout:The host key needs to be accepted, to auto accept run salt-ssh with the -i flag:The authenticity of host 10.0.0.221 (10.0.0.221) cant be established.ECDSA key fingerprint is b9:36:f5:d8:3a:88:94:93:43:78:8e:cb:43:78:8e:cb.Are you sure you want to continue connecting (yes/no)?
[rootsalt-master ~]#添加-i参数继续执行命令[rootsalt-master ~]# salt-ssh * -r free -m -i
hdd:----------retcode:0stderr:Warning: Permanently added 10.0.0.221 (ECDSA) to the list of known hosts.stdout:hdd10.0.0.221s password: total used free shared buffers cachedMem: 7856 6698 1157 18 317 4298-/ buffers/cache: 2082 5773Swap: 8061 0 8061
[rootsalt-master ~]#
[rootsalt-master ~]# salt-ssh hdd -r df -h
hdd:----------retcode:0stderr:stdout:Filesystem Size Used Avail Use% Mounted onudev 3.9G 4.0K 3.9G 1% /devtmpfs 786M 1.5M 785M 1% /run/dev/sda1 910G 454G 410G 53% /none 4.0K 0 4.0K 0% /sys/fs/cgroupnone 5.0M 0 5.0M 0% /run/locknone 3.9G 84K 3.9G 1% /run/shmnone 100M 12K 100M 1% /run/user但是我有一个问题保存的密钥放在哪里呢暂时我未有发现。 转载于:https://blog.51cto.com/yanconggod/1876147