{"id":3678,"date":"2020-06-11T14:06:29","date_gmt":"2020-06-11T06:06:29","guid":{"rendered":"https:\/\/www.webteach.tw\/?p=3678"},"modified":"2020-06-11T14:06:29","modified_gmt":"2020-06-11T06:06:29","slug":"ssh-login","status":"publish","type":"post","link":"https:\/\/www.webteach.tw\/?p=3678","title":{"rendered":"[ AWS ] &#8211; EC2 ALLOW ACCOUNT LOGIN SSH  WITHOUT KEY \u5141\u8a31\u4f7f\u7528\u5e33\u5bc6\u767b\u5165EC2"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">EC2 \u5efa\u7f6e\u904e\u7a0b\u4e2d\u6703\u8981\u6c42\u5275\u5efa\u4e00\u652fssh.key\u4e4b\u5f8c\u8981\u767b\u5165\u4e3b\u6a5f\u90fd\u8981\u900f\u904e\u6b64key\uff0c\u9019\u6a23\u7684\u4f5c\u6cd5\u5c0d\u4e3b\u6a5f\u4f86\u8aaa\u662f\u6bd4\u8f03\u5b89\u5168\u7684\uff0c\u6709key\u7684\u4eba\u624d\u80fd\u9032\u4e3b\u6a5f\uff0c\u4f46\u6709\u6642\u70ba\u4e86\u65b9\u4fbf\u767b\u5165\u5c31\u6703\u9700\u8981\u958b\u555f\u5e33\u5bc6\u767b\u5165\u3002<\/p>\n\n\n<p class=\"wp-block-paragraph\">\u6307\u4ee4\uff1asudo passwd ubuntu<br \/>\u8f38\u5165\u5169\u6b21\u65b0\u7684\u5bc6\u78bc<\/p>\n\n\n<p class=\"wp-block-paragraph\">\u66f4\u65b0ssh\u767b\u5165\u9a57\u8b49\u6a21\u5f0f<\/p>\n\n\n<p class=\"wp-block-paragraph\">\u6307\u4ee4\uff1anano \/etc\/ssh\/sshd_config<\/p>\n\n\n<p class=\"wp-block-paragraph\">\u5c07PasswordAuthentication no \u6539\u6210 yes<\/p>\n\n\n<p class=\"wp-block-paragraph\">\u5b58\u6a94\u5f8c\u91cd\u555f ssh \u670d\u52d9<\/p>\n\n\n<p class=\"wp-block-paragraph\">\u6307\u4ee4\uff1asudo service sshd restart<\/p>\n\n\n<p class=\"wp-block-paragraph\">\u4e4b\u5f8c\u5c31\u53ef\u4ee5\u76f4\u63a5\u4f7f\u7528\u5e33\u5bc6\u767b\u5165\u4e3b\u6a5f\uff0c\u539f\u5148\u7684ssh.key\u4e00\u6a23\u53ef\u4ee5\u4f7f\u7528\u3002<\/p>\n\n\n<p class=\"wp-block-paragraph\">\u5099\u8a3b\uff1a\u958b\u555f\u5e33\u5bc6\u767b\u5165\u6b0a\u9650\u5f8c\uff0c\u5c31\u6703\u6709\u88ab\u7206\u529b\u767b\u5165\u7684\u98a8\u96aa\u6b64\u6642\u9700\u52a0\u88ddfail2ban\u4f86\u963b\u6a94\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>EC2 \u5efa\u7f6e\u904e\u7a0b\u4e2d\u6703\u8981\u6c42\u5275\u5efa\u4e00\u652fssh.key\u4e4b\u5f8c\u8981\u767b\u5165\u4e3b\u6a5f\u90fd\u8981\u900f\u904e\u6b64key\uff0c\u9019\u6a23\u7684\u4f5c\u6cd5\u5c0d\u4e3b\u6a5f\u4f86\u8aaa\u662f\u6bd4\u8f03\u5b89\u5168\u7684\uff0c\u6709key\u7684\u4eba\u624d\u80fd\u9032\u4e3b\u6a5f\uff0c\u4f46\u6709\u6642\u70ba\u4e86\u65b9\u4fbf\u767b\u5165\u5c31\u6703\u9700\u8981\u958b\u555f\u5e33\u5bc6\u767b\u5165\u3002<\/p>\n","protected":false},"author":1,"featured_media":3815,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20,32],"tags":[],"class_list":["post-3678","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-aws","category-linux","hvn-theme-has-thumbnail"],"_links":{"self":[{"href":"https:\/\/www.webteach.tw\/index.php?rest_route=\/wp\/v2\/posts\/3678","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webteach.tw\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webteach.tw\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webteach.tw\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webteach.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3678"}],"version-history":[{"count":0,"href":"https:\/\/www.webteach.tw\/index.php?rest_route=\/wp\/v2\/posts\/3678\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.webteach.tw\/index.php?rest_route=\/wp\/v2\/media\/3815"}],"wp:attachment":[{"href":"https:\/\/www.webteach.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3678"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webteach.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3678"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webteach.tw\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3678"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}