知乎專欄 | 多維度架構 | 微信號 netkiller-ebook | QQ群:128659835 請註明“讀者” |
查詢 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