自动化管理工具Saltstack之认证篇(3)

Salt和minion之间的认证关系是通过salt-key在master端管理的,生成证书记录在/etc/salt/pki/master/目录下

salt-key常用参数说明:

格式:salt-key 参数 [minion端ID(可以是IP,也可以是主机名) [-y]

-L 列出当前所有认证,包括Accepted Keys、Denied Keys、Unaccepted Keys、Rejected Keys

-a 添加某个或某些个未接受(Unaccepted Keys)认证

-A 添加所有未接受(Unaccepted Keys)认证

-d 删除某个或某些个已接受(Accepted Keys)认证

-D 删除所有已接受(Accepted Keys)认证

-y 使用该参数可免去证书操作的交互,除非对minion端很信任,一般不建议使用

-h 帮助

例1:

列出当前所有认证

salt-key -L
Accepted Keys:
Denied Keys:
Unaccepted Keys:
10.0.10.100
10.0.10.101
10.0.10.200
Rejected Keys:
例2:

添加认证

salt-key -a 10.0.10.200
The following keys are going to be accepted:
Unaccepted Keys:
10.0.10.200
Proceed? [n/Y] y
Key for minion 10.0.10.200 accepted.
salt-key -L
Accepted Keys:
10.0.10.200
Denied Keys:
Unaccepted Keys:
10.0.10.100
10.0.10.101
Rejected Keys:
salt-key -a 10.0.10.10*            #可以使用匹配
The following keys are going to be accepted:
Unaccepted Keys:
10.0.10.100
10.0.10.101
Proceed? [n/Y] y
Key for minion 10.0.10.100 accepted.
Key for minion 10.0.10.101 accepted.


salt-key -L
Accepted Keys:
10.0.10.200
10.0.10.100
10.0.10.101
Denied Keys:
Unaccepted Keys:
Rejected Keys:


你可能感兴趣的:(saltstack)