查询 key 状态
# salt-key Accepted Keys: centos6.example.com haproxy.example.com Unaccepted Keys: Rejected Keys:
查看来自 minion 的 key
# salt-key -L
接受所有key
# salt-key -A
删除 key
# salt-key -d haproxy The following keys are going to be deleted: Accepted Keys: haproxy Proceed? [N/y] y
显示 key 文件内容
# salt-key -p centos6.example.com Accepted Keys: centos6.example.com: -----BEGIN PUBLIC KEY----- MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAw7E3x8jok8xsaKYJq948 HsElTLGR1AVBNoIT2EDAZkX/Zhyl4d0BT1C9JJN6/R/9tV9yr1+p7/GbbtPr+9GK 9ahO4S9QKtVCwyQVIaFRdZTlmHspCfE2gBgqXKNZfgCH2IILS8fJBo5GMvNgajRi qB3TShCV/UOBmkQ2H6p52xfhuubpAzrmdVVZOa03ASBTkNRUmE1kDIeZcIILBug3 XbsXYPv+Uz+rujxzSa5P2eF6O9kcr1QCNYHj3pgm2VL7ALkkbzCLbiAWSLVMmctQ Fx/uvRjZG+Bh/nmQ4Kz33pLgiyhHNaA+dXsF8YTrpU3QHb+UvByZH0Lwf//ekRzT QeSW9noZGlWkYn2uSAbEuIT9kg7xwd3rB/iEqKGBJcfn5kgaxstUywqr9i+F8Dhd X9hs3o46WIZMFeFX237oeXZ1lHgEwioZIYtmgEebqsMl9LT3EFG5/j2EzkEbE/Di hTJETbm7dttSj2tcwmb+S8hBJ6YRy1qTZsTYsdgjV3GC2U9lMeGjzhKB/znwR+kP 8BL0JnVEVVImzdTG1Y1sGRwbHXmOPGpyKCw/oLtjxw5nZuTRMeZcEd5Jj6pZBISv +Pqw+KdiiHUg47sP2G7wlZpLIvyUv69/Jq0bIP4BqTi1rDvWtSuySbkQoKFEFhMc Nff3pZp7Clm92WXb3+LS0z0CAwEAAQ== -----END PUBLIC KEY-----
key 文件存储位置
# ll /etc/salt/pki/master/minions total 8 -rw-r--r-- 1 root root 800 Aug 21 14:07 centos6.example.com -rw-r--r-- 1 root root 800 Aug 21 14:08 haproxy.example.com
原文出处:Netkiller 系列 手札
本文作者:陈景峯
转载请与作者联系,同时请务必标明文章原始出处和作者信息及本声明。