{"id":486,"date":"2021-06-01T17:19:48","date_gmt":"2021-06-01T09:19:48","guid":{"rendered":"https:\/\/22pig.com\/?p=486"},"modified":"2021-06-01T17:19:48","modified_gmt":"2021-06-01T09:19:48","slug":"ubuntu%e4%b8%ad%e5%85%81%e8%ae%b8root%e8%bf%9c%e7%a8%8bssh%e7%99%bb%e5%bd%95%e7%9a%84%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"http:\/\/22pig.com\/?p=486","title":{"rendered":"Ubuntu\u4e2d\u5141\u8bb8root\u8fdc\u7a0bssh\u767b\u5f55\u7684\u65b9\u6cd5"},"content":{"rendered":"<p>\u5141\u8bb8root\u7528\u6237\u767b\u5f55\uff1b\u7f16\u8f91\u914d\u7f6e\u6587\u4ef6\uff1a<\/p>\n<pre>sudo vim \/etc\/ssh\/sshd_config<\/pre>\n<pre>\u5c06PermitRootLogin prohibit-password<\/pre>\n<p>\u66f4\u6539\u4e3a\uff1a<\/p>\n<pre>PermitRootLogin yes<\/pre>\n<p>\u5982\u679c\u201cPermitRootLogin prohibit-password\u201d\u88ab\u6ce8\u91ca\uff0c\u5219\u53d6\u6d88\u6ce8\u91ca\u5e76\u66f4\u6539\u4e3aPermitRootLogin yes<\/p>\n<p>&nbsp;<\/p>\n<p>\u91cd\u542fssh\u670d\u52a1\uff1a<\/p>\n<pre>sudo systemctl restart sshd<\/pre>\n<p>\u7136\u540e\u4fee\u6539root\u7684\u5bc6\u7801\uff0c\u5f00\u542froot\u7528\u6237<\/p>\n<p>sudo passwd root<\/p>\n<p>\u518d\u6b21\u8fdb\u884c\u8fdc\u7a0b\u767b\u5f55\uff0c\u5373\u53ef\u6210\u529f!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5141\u8bb8root\u7528\u6237\u767b\u5f55\uff1b\u7f16\u8f91\u914d\u7f6e\u6587\u4ef6\uff1a sudo vim \/etc\/ssh\/sshd_config \u5c06PermitRootLogin prohibit-password \u66f4\u6539\u4e3a\uff1a PermitRootLogin yes \u5982\u679c\u201cPermitRootLogin prohibit-password\u201d\u88ab\u6ce8\u91ca\uff0c\u5219\u53d6\u6d88\u6ce8\u91ca\u5e76\u66f4\u6539\u4e3aPermitRootLogin yes &nbsp; \u91cd\u542fssh\u670d\u52a1\uff1a sudo systemctl restart sshd \u7136\u540e\u4fee\u6539root\u7684\u5bc6\u7801\uff0c\u5f00\u542froot\u7528\u6237 sudo passwd root \u518d\u6b21\u8fdb\u884c\u8fdc\u7a0b\u767b\u5f55\uff0c\u5373\u53ef\u6210\u529f!<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-486","post","type-post","status-publish","format-standard","hentry","category-java"],"_links":{"self":[{"href":"http:\/\/22pig.com\/index.php?rest_route=\/wp\/v2\/posts\/486","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/22pig.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/22pig.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/22pig.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/22pig.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=486"}],"version-history":[{"count":0,"href":"http:\/\/22pig.com\/index.php?rest_route=\/wp\/v2\/posts\/486\/revisions"}],"wp:attachment":[{"href":"http:\/\/22pig.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=486"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/22pig.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=486"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/22pig.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=486"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}