{"id":206188,"date":"2020-12-10T08:14:20","date_gmt":"2020-12-10T00:14:20","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=206188"},"modified":"2020-12-02T10:21:53","modified_gmt":"2020-12-02T02:21:53","slug":"delete-library","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/delete-library.html","title":{"rendered":"\u770b\u5b8c\u8fd9\u7bc7\u4e0d\u5728\u62c5\u5fc3\u5220\u5e93\u8dd1\u8def"},"content":{"rendered":"
\u5bfc\u8bfb<\/td>\n | \u5f00\u53d1\u4eba\u5458\u7ecf\u5e38\u9700\u8981\u8bbf\u95ee\u67d0\u4e9b\u670d\u52a1\u5668\uff0c\u505a\u4e00\u4e9b\u68c0\u67e5\u5e94\u7528\u7a0b\u5e8f\u65e5\u5fd7\u4e4b\u7c7b\u7684\u5de5\u4f5c\u3002\u5230\u76ee\u524d\u4e3a\u6b62\uff0c\u8fd9\u8fd8\u6ca1\u4ec0\u4e48\u95ee\u9898\u3002\u4f46\u662f\uff0c\u5f53\u4e00\u540d\u5f00\u53d1\u4eba\u5458\u79bb\u804c\u65f6\u53c8\u4f1a\u53d1\u751f\u4ec0\u4e48\u4e8b\u60c5\u5462\uff1f<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n \u5f00\u53d1\u4eba\u5458\u7ecf\u5e38\u9700\u8981\u8bbf\u95ee\u67d0\u4e9b\u670d\u52a1\u5668\uff0c\u505a\u4e00\u4e9b\u68c0\u67e5\u5e94\u7528\u7a0b\u5e8f\u65e5\u5fd7\u4e4b\u7c7b\u7684\u5de5\u4f5c\u3002<\/p>\n \u4e00\u822c\u6765\u8bf4\uff0c\u8bbf\u95ee\u8fc7\u7a0b\u662f\u4f7f\u7528\u516c\u79c1\u94a5\u52a0\u5bc6\u6765\u63a7\u5236\u7684\uff0c\u6bcf\u4f4d\u5f00\u53d1\u4eba\u5458\u90fd\u4f1a\u751f\u6210\u81ea\u5df1\u7684\u516c\u79c1\u94a5\u5bf9\u3002\u5e76\u4e14\uff0c\u6bcf\u4e2a\u5f00\u53d1\u4eba\u5458\u7684\u516c\u94a5\u90fd\u4f1a\u6dfb\u52a0\u5230\u4ed6\u4eec\u6709\u6743\u8bbf\u95ee\u7684\u6bcf\u53f0\u670d\u52a1\u5668\u4e0a\u7684 authorized_keys \u6587\u4ef6\u4e2d\u3002<\/p>\n <\/p>\n 1. \u75db\u82e6\u7684\u624b\u52a8\u66f4\u6539<\/strong><\/span><\/div>\n \u5230\u76ee\u524d\u4e3a\u6b62\uff0c\u8fd9\u8fd8\u6ca1\u4ec0\u4e48\u95ee\u9898\u3002\u4f46\u662f\uff0c\u5f53\u4e00\u540d\u5f00\u53d1\u4eba\u5458\u79bb\u804c\u65f6\u53c8\u4f1a\u53d1\u751f\u4ec0\u4e48\u4e8b\u60c5\u5462\uff1f<\/p>\n \u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u5e94\u8be5\u4ece\u6240\u6709\u670d\u52a1\u5668\u4e0a\u5220\u9664\u8fd9\u4f4d\u5f00\u53d1\u4eba\u5458\u7684\u516c\u94a5\u3002\u6839\u636e\u4ed6\u4eec\u6709\u6743\u8bbf\u95ee\u7684\u670d\u52a1\u5668\u6570\u91cf\uff0c\u8fd9\u53ef\u80fd\u4f1a\u6d89\u53ca\u5f88\u591a\u5de5\u4f5c\u3002<\/p>\n \u66f4\u7cdf\u7cd5\u7684\u662f\uff0c\u5982\u679c\u8fd9\u4e2a\u73af\u8282\u90fd\u662f\u624b\u52a8\u64cd\u4f5c\u7684\uff0c\u90a3\u4e48\u64cd\u4f5c\u5458\u5f88\u6709\u53ef\u80fd\u4f1a\u5fd8\u4e86\u5220\u9664\u67d0\u4e9b\u670d\u52a1\u5668\u4e0a\u7684\u516c\u94a5\u3002\u4e5f\u5c31\u662f\u8bf4\uff0c\u79bb\u804c\u5458\u5de5\u7684\u8bbf\u95ee\u6743\u9650\u4ecd\u7136\u4fdd\u6301\u542f\u7528\u72b6\u6001\u3002<\/p>\n 2. \u66ff\u4ee3\u89e3\u51b3\u65b9\u6848<\/strong><\/span><\/div>\n \u6709\u4e00\u4e9b\u5546\u4e1a\u548c\u5f00\u6e90\u89e3\u51b3\u65b9\u6848\u53ef\u4ee5\u5e2e\u52a9\u6211\u4eec\u89e3\u51b3\u8fd9\u4e00\u95ee\u9898\u3002\u8fd9\u91cc\u7684\u57fa\u672c\u601d\u60f3\u662f\uff0c\u4f60\u5728\u8fd9\u7c7b\u670d\u52a1\u4e0a\u6dfb\u52a0\u5e76\u7ef4\u62a4\u4e00\u4e2a\u5bc6\u94a5\u548c\u8bbf\u95ee\u6743\u9650\u5217\u8868\uff0c\u9700\u8981\u5220\u9664\u67d0\u4e2a\u5bc6\u94a5\u65f6\uff0c\u8be5\u5bc6\u94a5\u5c06\u4ece\u6240\u6709\u670d\u52a1\u5668\u4e2d\u5220\u9664\u3002<\/p>\n \u8fd9\u542c\u8d77\u6765\u4e0d\u9519\uff0c\u4f46\u8fd9\u79cd\u65b9\u6848\u6709\u4e00\u4e2a\u5f88\u5927\u7684\u7f3a\u9677\uff1a\u5b83\u662f\u6f5c\u5728\u7684\u5355\u4e00\u6545\u969c\u6e90\u3002\u5982\u679c\u67d0\u4eba\u83b7\u53d6\u4e86\u5bf9\u8be5\u670d\u52a1\u7684\u8bbf\u95ee\u6743\u9650\uff0c\u90a3\u5c31\u610f\u5473\u7740\u4ed6\u53ef\u4ee5\u8bbf\u95ee\u4f60\u7684\u6240\u6709\u670d\u52a1\u5668\u3002\u800c\u4e14\uff0c\u5982\u679c\u4f60\u65e0\u6cd5\u8bbf\u95ee\u8fd9\u4e2a\u670d\u52a1\uff0c\u5728\u6700\u574f\u7684\u60c5\u51b5\u4e0b\uff0c\u751a\u81f3\u4f1a\u65e0\u6cd5\u8bbf\u95ee\u6240\u6709\u670d\u52a1\u5668\u3002<\/p>\n \u89e3\u51b3\u65b9\u6848\uff1a\u7b7e\u540d\u5bc6\u94a5<\/strong><\/span><\/div>\n \u5f53\u6211\u9047\u5230\u4e86\u8fd9\u4e2a\u95ee\u9898\u65f6\uff0c\u6211\u53bb HackerNews \u4e0a\u95ee\u4e86\u95ee\u5176\u4ed6\u4eba\u662f\u5982\u4f55\u89e3\u51b3\u5b83\u7684\u3002<\/p>\n https:\/\/news.ycombinator.com\/item?id=24157180<\/p>\n \u793e\u533a\u63d0\u4f9b\u4e86\u4e00\u4e9b\u5f88\u68d2\u7684\u5efa\u8bae\u548c\u89c1\u89e3\uff0c\u800c\u8fd9\u4e2a\u95ee\u9898\u7684\u6700\u4f73\u89e3\u51b3\u65b9\u6848\u4f3c\u4e4e\u662f\u5bf9\u5bc6\u94a5\u8fdb\u884c\u7b7e\u540d\uff0c\u672c\u6587\u4f1a\u8be6\u7ec6\u7ed9\u5927\u5bb6\u4ecb\u7ecd\u4e00\u4e0b\u3002<\/p>\n \u57fa\u672c\u601d\u60f3<\/strong><\/span><\/div>\n \u8fd9\u4e2a\u65b9\u6cd5\u7684\u57fa\u672c\u601d\u60f3\u662f\uff1a\u4f60\u8fd8\u662f\u8981\u4e3a\u6bcf\u4f4d\u5f00\u53d1\u4eba\u5458\u751f\u6210\u4e00\u4e2a\u516c\u94a5 - \u79c1\u94a5\u5bf9\u3002\u4f46\u662f\uff0c\u4e0d\u8981\u628a\u516c\u94a5\u4e0a\u8f7d\u5230\u670d\u52a1\u5668\u4e0a\u3002<\/p>\n \u800c\u662f\u4f7f\u7528\u4e4b\u524d\u751f\u6210\u7684\uff0c\u6240\u8c13\u7684\u8bc1\u4e66\u9881\u53d1\u673a\u6784\uff08CA\uff09\u5bc6\u94a5\u5bf9\u516c\u5171\u5bc6\u94a5\u8fdb\u884c\u7b7e\u540d\u3002\u8fd9\u4e2a\u7b7e\u540d\u5c31\u662f\u751f\u6210\u4e86\u7b2c\u4e09\u4e2a\u8bc1\u4e66\u6587\u4ef6\uff0c\u4f60\u5c06\u5b83\u8fd8\u7ed9\u5f00\u53d1\u4eba\u5458\uff0c\u7136\u540e\u8ba9\u4ed6\u4eec\u653e\u5728.ssh\/\u6587\u4ef6\u5939\u4e2d\uff0c\u548c\u79c1\u94a5\u3001\u516c\u94a5\u653e\u5728\u4e00\u8d77\u3002<\/p>\n \u5728\u670d\u52a1\u5668\u4e0a\uff0c\u4f60\u53ea\u9700\u544a\u8bc9\u670d\u52a1\u5668\u4f60\u7684 CA \u7684\u516c\u94a5\uff0c\u670d\u52a1\u5668\u5c31\u53ef\u4ee5\u68c0\u6d4b\u7528\u6237\u662f\u5426\u5177\u6709\u6b63\u786e\u7b7e\u540d\u7684\u8bc1\u4e66\uff0c\u5e76\u4e14\u4ec5\u5141\u8bb8\u62e5\u6709\u8fd9\u79cd\u7b7e\u540d\u8bc1\u4e66\u7684\u5f00\u53d1\u4eba\u5458\u8bbf\u95ee\u81ea\u5df1\u3002<\/p>\n \u4f18\u70b9<\/strong><\/span><\/div>\n \u7b7e\u7f72\u8bc1\u4e66\u65f6\uff0c\u53ef\u4ee5\u5b9a\u4e49\u8fd9\u6b21\u7b7e\u7f72\u6709\u6548\u7684\u65f6\u95f4\u3002\u56e0\u6b64\uff0c\u5982\u679c\u4f60\u7b7e\u7f72\u7684\u6709\u6548\u671f\u4e3a 3 \u4e2a\u6708\uff0c\u968f\u540e\u5f00\u53d1\u4eba\u5458\u79bb\u5f00\u4e86\u516c\u53f8\uff0c\u90a3\u4e48 3 \u4e2a\u6708\u540e\uff0c\u4ed6\u4eec\u80af\u5b9a\u5c06\u65e0\u6cd5\u8bbf\u95ee\u4efb\u4f55\u670d\u52a1\u5668\u3002<\/p>\n \u73b0\u5728\u4f60\u4f1a\u8bf4\uff1a\u597d\u5427\uff0c\u4f46\u6211\u4e0d\u60f3\u6bcf 3 \u4e2a\u6708\u5c31\u5bf9\u6bcf\u4e2a\u4eba\u7684\u5bc6\u94a5\u7b7e\u4e00\u6b21\u540d\uff0c\u8fd9\u4e2a\u62b1\u6028\u5f88\u5408\u7406\u3002<\/p>\n \u4e00\u79cd\u529e\u6cd5\u662f\u8ba9\u8fd9\u4e2a\u6d41\u7a0b\u81ea\u52a8\u5316\uff0c\u4f8b\u5982\uff0c\u4f60\u53ef\u4ee5\u6784\u5efa\u670d\u52a1\uff0c\u8ba9\u7528\u6237\u5728\u4f7f\u7528\u516c\u53f8\u7684\u7535\u5b50\u90ae\u4ef6\u548c\u5bc6\u7801\u6388\u6743\u65f6\u53ef\u4ee5\u81ea\u52a8\u83b7\u5f97\u7b7e\u540d\u8bc1\u4e66\uff0c\u4f46\u8fd9\u4e0d\u5728\u672c\u6587\u7684\u8ba8\u8bba\u8303\u56f4\u4e4b\u5185\u3002<\/p>\n \u53e6\u4e00\u79cd\u7b80\u5355\u7684\u66ff\u4ee3\u65b9\u6cd5\u662f\uff0c\u4f60\u53ef\u4ee5\u9881\u53d1\u6709\u6548\u671f\u66f4\u957f\u7684\u8bc1\u4e66\u3002\u7136\u540e\uff0c\u5982\u679c\u6709\u4eba\u79bb\u5f00\u516c\u53f8\uff0c\u5c31\u53ef\u4ee5\u64a4\u6d88\u8fd9\u4e2a\u8bc1\u4e66\uff0c\u4e5f\u5c31\u662f\u4f7f\u5176\u5931\u6548\u3002\u4f60\u53ef\u4ee5\u5728\u670d\u52a1\u5668\u4e0a\u653e\u7f6e\u4e00\u4e2a\u65e0\u6548\u8bc1\u4e66\u5217\u8868\uff0c\u5b83\u4eec\u5c06\u4e0d\u518d\u63a5\u53d7\u7528\u6237\u8bbf\u95ee\u3002\u4f8b\u5982\uff0c\u53ef\u4ee5\u901a\u8fc7 AWS S3 \u6216\u5176\u4ed6\u5b58\u50a8\u6765\u5b58\u653e\u8fd9\u4e2a\u5217\u8868\uff0c\u5e76\u5728\u6bcf\u53f0\u670d\u52a1\u5668\u4e0a\u5b9a\u671f\u521b\u5efa\u4e00\u4e2a cronjob \u6765\u5b8c\u6210\u8fd9\u4e00\u64cd\u4f5c\u3002<\/p>\n \u8be5\u600e\u4e48\u505a\uff1f<\/strong><\/span><\/div>\n \u4e86\u89e3\u4e86\u539f\u7406\u540e\uff0c\u5b9e\u9645\u4e0a\u505a\u8d77\u6765\u975e\u5e38\u7b80\u5355\u3002<\/p>\n \u9996\u5148\uff0c\u4f60\u8981\u751f\u6210\u4e00\u4e2a\u8bc1\u4e66\u9881\u53d1\u673a\u6784\u7684\u516c\u94a5 - \u79c1\u94a5\u5bf9\uff0c\u4f60\u5e94\u8be5\u628a\u8fd9\u4e2a\u79c1\u94a5\u653e\u5728\u975e\u5e38\u5b89\u5168\u7684\u5730\u65b9\uff1a<\/p>\n umask 77 # you want it to be private \r\n \r\nmkdir ~\/my-ca && cd ~\/my-ca \r\n \r\nssh-keygen -C CA -f ca -b 4096 # be sure to use a passphrase and store it securely \r\n<\/pre>\n |