{"id":805,"date":"2020-09-12T09:52:33","date_gmt":"2020-09-12T01:52:33","guid":{"rendered":"https:\/\/www.linuxdevops.cn\/?p=805"},"modified":"2020-09-12T09:54:56","modified_gmt":"2020-09-12T01:54:56","slug":"aws-uses-session-manager-to-log-in-and-manage-ec2-hosts","status":"publish","type":"post","link":"https:\/\/www.linuxdevops.cn\/2020\/09\/aws-uses-session-manager-to-log-in-and-manage-ec2-hosts\/","title":{"rendered":"AWS \u4f7f\u7528 Session Manager \u767b\u5f55\u548c\u7ba1\u7406 EC2 \u4e3b\u673a"},"content":{"rendered":"\n

<\/p>\n\n\n\n

Session Manager \u662f\u4ec0\u4e48\uff0c\u80fd\u505a\u4ec0\u4e48<\/strong><\/h3>\n\n\n\n

AWS Systems Manager \u4f1a\u8bdd\u7ba1\u7406\u5668\u662f\u4e00\u4e2a\u65b0\u7684\u4ea4\u4e92\u5f0f Shell \u548c CLI\uff0c\u6709\u52a9\u4e8e\u63d0\u4f9b\u5b89\u5168\u3001\u8bbf\u95ee\u6743\u9650\u53d7\u5230\u63a7\u5236\u4e14\u7ecf\u8fc7\u5ba1\u8ba1\u7684 Windows \u548c Linux EC2 \u5b9e\u4f8b\u7ba1\u7406\u3002\u4f7f\u7528\u4f1a\u8bdd\u7ba1\u7406\u5668\uff0c\u60a8\u65e0\u9700\u6253\u5f00\u5165\u7ad9\u7aef\u53e3\u3001\u7ba1\u7406 SSH \u5bc6\u94a5\u6216\u4f7f\u7528\u5821\u5792\u4e3b\u673a\u3002\u5e76\u4e14\u767b\u5f55\u7684\u4e3b\u673a\u53ef\u4ee5\u5904\u4e8e\u516c\u6709\u5b50\u7f51\u6216\u8005\u79c1\u6709\u5b50\u7f51\u3002<\/p>\n\n\n\n

\u501f\u52a9\u4f1a\u8bdd\u7ba1\u7406\u5668\uff0c\u60a8\u53ef\u4ee5\u63d0\u9ad8\u5b89\u5168\u6027\uff0c\u96c6\u4e2d\u8fdb\u884c\u8bbf\u95ee\u7ba1\u7406\u5e76\u63a5\u6536\u8be6\u7ec6\u7684\u5ba1\u8ba1\u3002\u9664\u4e86\u65e0\u9700\u6253\u5f00\u5165\u7ad9\u7aef\u53e3\u4e4b\u5916\uff0c\u60a8\u8fd8\u53ef\u4ee5\u7ed3\u5408\u4f7f\u7528\u4f1a\u8bdd\u7ba1\u7406\u5668\u4e0e AWS NAT Gateway\uff0c\u4ee5\u4fbf\u767b\u5f55\u5904\u4e8e\u79c1\u6709\u5b50\u7f51\u7684EC2\u4e3b\u673a\u3002\u901a\u8fc7\u4f7f\u7528 AWS Identity and Access Management (IAM) \u7b56\u7565\uff0c\u60a8\u53ef\u4ee5\u5728\u4e00\u4e2a\u4e2d\u5fc3\u4f4d\u7f6e\u6388\u4e88\u548c\u64a4\u9500\u5bf9\u5b9e\u4f8b\u7684\u8bbf\u95ee\u6743\u9650\u3002\u63d0\u4f9b\u8bbf\u95ee\u6743\u9650\u540e\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528 AWS CloudTrail \u5ba1\u8ba1\u54ea\u4e2a\u7528\u6237\u8bbf\u95ee\u4e86\u5b9e\u4f8b\uff0c\u5e76\u5c06\u6bcf\u4e2a\u547d\u4ee4\u8bb0\u5f55\u5230 Amazon S3 \u6216 Amazon CloudWatch Logs\u3002\u4f1a\u8bdd\u7ba1\u7406\u5668\u7528\u6237\u53ea\u9700\u5355\u51fb\u5e76\u542f\u52a8\u4e00\u4e2a\u4f1a\u8bdd\uff0c\u7136\u540e\u9009\u62e9\u4e00\u4e2a\u5b9e\u4f8b\uff0c\u5373\u53ef\u5feb\u901f\u5f00\u59cb\u4f7f\u7528\u8be5\u5de5\u5177\u3002<\/p>\n\n\n\n

\u8981\u4e86\u89e3\u6709\u5173 AWS Systems Manager \u7684\u66f4\u591a\u4fe1\u606f\uff0c\u8bf7\u8bbf\u95ee\u6211\u4eec\u7684\u4ea7\u54c1\u9875\u9762<\/a>\u548c\u6587\u6863<\/a>\u3002<\/p>\n\n\n\n

\u60a8\u73b0\u5728\u53ef\u4ee5\u4f7f\u7528\u65b0\u7684\u57fa\u4e8e\u6d4f\u89c8\u5668\u7684\u4ea4\u4e92\u5f0fshell\u548c\u547d\u4ee4\u884c\u754c\u9762\uff08CLI\uff09\u6765\u7ba1\u7406Windows\u548cLinux\u5b9e\u4f8b\u3002 \u4f7f\u7528Session Manager\u6765\u7ba1\u7406\u4e3b\u673a\uff0c\u53ef\u4ee5\u7ed9\u60a8\u7684\u7ba1\u7406\u5e26\u6765\u5982\u4e0b\u597d\u5904\uff1a<\/p>\n\n\n\n