{"id":1637,"date":"2023-03-04T15:50:25","date_gmt":"2023-03-04T07:50:25","guid":{"rendered":"https:\/\/jdssl.top\/?p=1637"},"modified":"2023-03-04T15:59:18","modified_gmt":"2023-03-04T07:59:18","slug":"ubuntu-root","status":"publish","type":"post","link":"https:\/\/jdssl.top\/index.php\/2023\/03\/04\/ubuntu-root\/","title":{"rendered":"Ubuntu \u7cfb\u7edf\u5982\u4f55\u4f7f\u7528 root \u7528\u6237\u767b\u5f55\u5b9e\u4f8b\uff1f"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"1637\" class=\"elementor elementor-1637\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-2a04b416 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"2a04b416\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-4d24ddea\" data-id=\"4d24ddea\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-7c8a9d22 elementor-widget elementor-widget-text-editor\" data-id=\"7c8a9d22\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p><\/p>\n<h3 class=\"wp-block-heading\" id=\"ubuntu-.E7.B3.BB.E7.BB.9F.E5.A6.82.E4.BD.95.E4.BD.BF.E7.94.A8-root-.E7.94.A8.E6.88.B7.E7.99.BB.E5.BD.95.E5.AE.9E.E4.BE.8B.EF.BC.9F\">\u00a0<\/h3>\n<p><\/p>\n<p><\/p>\n<p>Ubuntu \u7cfb\u7edf\u7684\u9ed8\u8ba4\u7528\u6237\u540d\u662f ubuntu\uff0c\u5e76\u5728\u5b89\u88c5\u8fc7\u7a0b\u4e2d\u9ed8\u8ba4\u4e0d\u8bbe\u7f6e root \u5e10\u6237\u548c\u5bc6\u7801\u3002\u60a8\u5982\u6709\u9700\u8981\uff0c\u53ef\u5728\u8bbe\u7f6e\u4e2d\u5f00\u542f\u5141\u8bb8 root \u7528\u6237\u767b\u5f55\u3002\u5177\u4f53\u64cd\u4f5c\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n<p><span style=\"color: var(--text-color);\">\u4f7f\u7528 ubuntu \u5e10\u6237\u767b\u5f55\u8f7b\u91cf\u5e94\u7528\u670d\u52a1\u5668\u3002<\/span><\/p>\n<p><span style=\"color: var(--text-color);\">\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\uff0c\u8bbe\u7f6e root \u5bc6\u7801\u3002<\/span><\/p>\n<pre><code>sudo passwd root<\/code><\/pre>\n<p>\u00a0<\/p>\n<p><span style=\"color: var(--text-color);\">\u8f93\u5165 root \u7684\u5bc6\u7801\uff0c\u6309\u00a0Enter\u3002<\/span><\/p>\n<p><span style=\"color: var(--text-color);\">\u91cd\u590d\u8f93\u5165 root \u7684\u5bc6\u7801\uff0c\u6309\u00a0Enter\u3002<\/span><\/p>\n<p><span style=\"color: var(--text-color);\">\u8fd4\u56de\u5982\u4e0b\u4fe1\u606f\uff0c\u5373\u8868\u793a root \u5bc6\u7801\u8bbe\u7f6e\u6210\u529f\u3002<\/span><\/p>\n<pre><code>passwd: password updated successfully<\/code><\/pre>\n<p>\u00a0<\/p>\n<p><span style=\"color: var(--text-color);\">\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\uff0c\u6253\u5f00\u00a0<\/span><code>sshd_config<\/code><span style=\"color: var(--text-color);\">\u00a0\u914d\u7f6e\u6587\u4ef6\u3002<\/span><\/p>\n<pre><code>sudo vi \/etc\/ssh\/sshd_config<\/code><\/pre>\n<p>\u00a0<\/p>\n<p><span style=\"color: var(--text-color);\">\u6309\u00a0<b>i\u00a0<\/b>\u5207\u6362\u81f3\u7f16\u8f91\u6a21\u5f0f\uff0c<\/span><\/p>\n<pre><span style=\"color: var(--text-color);\">\u627e\u5230\u00a0<\/span><code>#Authentication<\/code><span style=\"color: var(--text-color);\">\uff0c\u5c06\u00a0<\/span><code>PermitRootLogin<\/code><span style=\"color: var(--text-color);\">\u00a0\u53c2\u6570\u4fee\u6539\u4e3a\u00a0<\/span><code>yes<\/code><span style=\"color: var(--text-color);\">\u3002<\/span><\/pre>\n<pre><span style=\"color: var(--text-color);\">\u5982\u679c\u00a0<\/span><code>PermitRootLogin<\/code><span style=\"color: var(--text-color);\">\u00a0\u53c2\u6570\u88ab\u6ce8\u91ca\uff0c\u8bf7\u53bb\u6389\u9996\u884c\u7684\u6ce8\u91ca\u7b26\u53f7\uff08<\/span><code>#<\/code><span style=\"color: var(--text-color);\">\uff09\u3002<\/span><\/pre>\n<p><span style=\"color: var(--text-color);\">\u5982\u4e0b\u56fe\u6240\u793a\uff1a<\/span><\/p>\n<p><img decoding=\"async\" style=\"color: var(--text-color);\" src=\"https:\/\/main.qcloudimg.com\/raw\/e3d9dd2e362616a8bc25f8793a403cba.png\" alt=\"\" \/><\/p>\n<pre><span style=\"color: var(--text-color);\">\u627e\u5230\u00a0<\/span><code>#Authentication<\/code><span style=\"color: var(--text-color);\">\uff0c\u5c06\u00a0<\/span><code>PasswordAuthentication<\/code><span style=\"color: var(--text-color);\">\u00a0\u53c2\u6570\u4fee\u6539\u4e3a yes\u3002<\/span><\/pre>\n<p><span style=\"color: var(--text-color);\">\u5982\u4e0b\u56fe\u6240\u793a\uff1a<\/span><\/p>\n<pre><span style=\"color: var(--text-color);\">\u8bf4\u660e\uff1a<\/span><span style=\"color: var(--text-color);\">\u82e5\u00a0<\/span><code>sshd_config<\/code><span style=\"color: var(--text-color);\">\u00a0\u914d\u7f6e\u6587\u4ef6\u4e2d\u65e0\u6b64\u914d\u7f6e\u9879\uff0c\u5219\u6dfb\u52a0\u00a0<\/span><code>PasswordAuthentication yes<\/code><span style=\"color: var(--text-color);\">\u00a0\u9879\u5373\u53ef\u3002<\/span><\/pre>\n<p><img decoding=\"async\" style=\"color: var(--text-color);\" src=\"https:\/\/main.qcloudimg.com\/raw\/29ebeedf5f50279aa67974784d6140af.png\" alt=\"\" \/><\/p>\n<pre><span style=\"color: var(--text-color);\">\u6309\u00a0Esc\uff0c\u8f93\u5165\u00a0:wq\uff0c\u4fdd\u5b58\u6587\u4ef6\u5e76\u8fd4\u56de\u3002<\/span><\/pre>\n<pre><span style=\"color: var(--text-color);\">\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\uff0c\u91cd\u542f ssh \u670d\u52a1\u3002<\/span><code>sudo service ssh restart<\/code><\/pre>\n<p><span style=\"color: var(--text-color);\">\u53c2\u8003\u4f7f\u7528\u8fdc\u7a0b\u767b\u5f55\u8f6f\u4ef6\u767b\u5f55 Linux \u5b9e\u4f8b \uff0c\u5e76\u4f7f\u7528\u4ee5\u4e0b\u4fe1\u606f\u767b\u5f55 Ubuntu \u8f7b\u91cf\u5e94\u7528\u670d\u52a1\u5668\uff1a<\/span><\/p>\n<p><span style=\"color: var(--text-color);\">\u7528\u6237\u540d\uff1aroot<\/span><\/p>\n<p><span style=\"color: var(--text-color);\">\u767b\u5f55\u5bc6\u7801\uff1a\u5728\u00a0<\/span>\u6b65\u9aa42<span style=\"color: var(--text-color);\">\u00a0\u4e2d\u5df2\u8bbe\u7f6e\u7684\u5bc6\u7801<\/span><\/p>\n<p><\/p>\n<p><!-- \/wp:list --><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>\u00a0 Ubuntu \u7cfb\u7edf\u7684\u9ed8\u8ba4\u7528\u6237\u540d\u662f ubuntu\uff0c\u5e76\u5728\u5b89\u88c5\u8fc7\u7a0b\u4e2d\u9ed8\u8ba4\u4e0d\u8bbe\u7f6e root \u5e10\u6237\u548c\u5bc6\u7801\u3002\u60a8\u5982\u6709\u9700\u8981 &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"https:\/\/jdssl.top\/index.php\/2023\/03\/04\/ubuntu-root\/\"> <span class=\"screen-reader-text\">Ubuntu \u7cfb\u7edf\u5982\u4f55\u4f7f\u7528 root \u7528\u6237\u767b\u5f55\u5b9e\u4f8b\uff1f<\/span> \u67e5\u770b\u5168\u6587 &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":1638,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"_uag_custom_page_level_css":"","_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"site-sidebar-layout":"default","site-content-layout":"default","ast-global-header-display":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","footnotes":""},"categories":[10,1],"tags":[],"class_list":["post-1637","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-lengmen","category-suoyoufenlei"],"uagb_featured_image_src":{"full":["https:\/\/jdssl.top\/wp-content\/uploads\/2023\/03\/1.png",1920,1080,false],"thumbnail":["https:\/\/jdssl.top\/wp-content\/uploads\/2023\/03\/1.png",150,84,false],"medium":["https:\/\/jdssl.top\/wp-content\/uploads\/2023\/03\/1.png",300,169,false],"medium_large":["https:\/\/jdssl.top\/wp-content\/uploads\/2023\/03\/1.png",768,432,false],"large":["https:\/\/jdssl.top\/wp-content\/uploads\/2023\/03\/1.png",1024,576,false],"1536x1536":["https:\/\/jdssl.top\/wp-content\/uploads\/2023\/03\/1.png",1536,864,false],"2048x2048":["https:\/\/jdssl.top\/wp-content\/uploads\/2023\/03\/1.png",1920,1080,false]},"uagb_author_info":{"display_name":"xiaoji","author_link":"https:\/\/jdssl.top\/index.php\/author\/bogond\/"},"uagb_comment_info":0,"uagb_excerpt":"\u00a0 Ubuntu \u7cfb\u7edf\u7684\u9ed8\u8ba4\u7528\u6237\u540d\u662f ubuntu\uff0c\u5e76\u5728\u5b89\u88c5\u8fc7\u7a0b\u4e2d\u9ed8\u8ba4\u4e0d\u8bbe\u7f6e root \u5e10\u6237\u548c\u5bc6\u7801\u3002\u60a8\u5982\u6709\u9700\u8981&hellip;","_links":{"self":[{"href":"https:\/\/jdssl.top\/index.php\/wp-json\/wp\/v2\/posts\/1637","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jdssl.top\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jdssl.top\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jdssl.top\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jdssl.top\/index.php\/wp-json\/wp\/v2\/comments?post=1637"}],"version-history":[{"count":5,"href":"https:\/\/jdssl.top\/index.php\/wp-json\/wp\/v2\/posts\/1637\/revisions"}],"predecessor-version":[{"id":1643,"href":"https:\/\/jdssl.top\/index.php\/wp-json\/wp\/v2\/posts\/1637\/revisions\/1643"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/jdssl.top\/index.php\/wp-json\/wp\/v2\/media\/1638"}],"wp:attachment":[{"href":"https:\/\/jdssl.top\/index.php\/wp-json\/wp\/v2\/media?parent=1637"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jdssl.top\/index.php\/wp-json\/wp\/v2\/categories?post=1637"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jdssl.top\/index.php\/wp-json\/wp\/v2\/tags?post=1637"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}