{"id":1336,"date":"2024-07-09T14:57:32","date_gmt":"2024-07-09T06:57:32","guid":{"rendered":"https:\/\/blog.nonot.cn\/?p=1336"},"modified":"2024-07-09T15:02:47","modified_gmt":"2024-07-09T07:02:47","slug":"linux%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%85%8d%e5%af%86%e7%a0%81%e7%99%bb%e5%bd%95","status":"publish","type":"post","link":"https:\/\/blog.nonot.cn\/index.php\/2024\/07\/09\/linux%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%85%8d%e5%af%86%e7%a0%81%e7%99%bb%e5%bd%95\/","title":{"rendered":"Linux\u670d\u52a1\u5668\u514d\u5bc6\u7801\u767b\u5f55"},"content":{"rendered":"<p>1,\u5728\u529e\u516c\u7535\u8111\u751f\u6210\u516c\u79c1\u94a5\uff0c\u5c06\u516c\u94a5\u4e0a\u4f20\u5230\u670d\u52a1\u5668<\/p>\n<p>ssh<span class=\"hljs-attribute\">-keygen\u00a0-t rsa\u00a0-P\u00a0<span class=\"hljs-string\">&#8221;<\/span><\/span><\/p>\n<p>-P\u8868\u793a\u5bc6\u7801\uff0c-P \u201d \u5c31\u8868\u793a\u7a7a\u5bc6\u7801\uff0c\u4e5f\u53ef\u4ee5\u4e0d\u7528-P\u53c2\u6570\uff0c\u8fd9\u6837\u5c31\u8981\u4e09\u8f66\u56de\u8f66\uff0c\u7528-P\u5c31\u4e00\u6b21\u56de\u8f66\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>2\uff0c\u628a\u529e\u516c\u7535\u8111~\/.ssh\/id_rsa.pub \u5185\u5bb9\u590d\u5236\u5230B\u673a\u7684 \/root\/.ssh\/authorized_keys\u6587\u4ef6\u91cc<\/p>\n<p>&nbsp;<\/p>\n<p>3\uff0c\u91cd\u542fssh\u670d\u52a1<\/p>\n<p>\/etc\/init.d\/sshd restart<\/p>\n<p>\u82e5\u91cd\u542f\u65f6\u62a5\u9519\uff1a<\/p>\n<h1 id=\"articleContentId\" class=\"title-article\">Redirecting to \/bin\/systemctl restart sshd.service<\/h1>\n<p>\u5728\u4e91\u670d\u52a1\u5668 ECS Linux CentOS 7 \u4e0b\u91cd\u542f\u670d\u52a1\u4e0d\u518d\u901a\u8fc7 service \u64cd\u4f5c\uff0c\u800c\u662f\u901a\u8fc7 systemctl \u64cd\u4f5c\u3002 \u64cd\u4f5c\u8bf4\u660e\u5982\u4e0b\uff1a<\/p>\n<p>1. \u67e5\u770b sshd \u670d\u52a1\u662f\u5426\u542f\u52a8\uff1a<\/p>\n<p>&nbsp;<\/p>\n<p>\u770b\u5230\u4e0a\u8ff0\u4fe1\u606f\u5c31\u53ef\u4ee5\u786e\u5b9a\u662f\u542f\u52a8\u4e86\u3002<\/p>\n<p>2. \u5982\u679c\u6ca1\u6709\u542f\u52a8\uff0c\u5219\u9700\u8981\u542f\u52a8\u8be5\u670d\u52a1\uff1a<\/p>\n<p>systemctl start sshd.service<br \/>\n3. \u91cd\u542f sshd \u670d\u52a1\uff1a<\/p>\n<p>systemctl restart sshd.service<br \/>\n4. \u8bbe\u7f6e\u670d\u52a1\u5f00\u542f\u81ea\u542f\uff1a<\/p>\n<p>systemctl enable sshd.service<\/p>\n<h1 class=\"title-article\"><\/h1>\n","protected":false},"excerpt":{"rendered":"<p>1,\u5728\u529e\u516c\u7535\u8111\u751f\u6210\u516c\u79c1\u94a5\uff0c\u5c06\u516c\u94a5\u4e0a\u4f20\u5230\u670d\u52a1\u5668 ssh-key&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-1336","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/blog.nonot.cn\/index.php\/wp-json\/wp\/v2\/posts\/1336","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.nonot.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.nonot.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.nonot.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.nonot.cn\/index.php\/wp-json\/wp\/v2\/comments?post=1336"}],"version-history":[{"count":1,"href":"https:\/\/blog.nonot.cn\/index.php\/wp-json\/wp\/v2\/posts\/1336\/revisions"}],"predecessor-version":[{"id":1337,"href":"https:\/\/blog.nonot.cn\/index.php\/wp-json\/wp\/v2\/posts\/1336\/revisions\/1337"}],"wp:attachment":[{"href":"https:\/\/blog.nonot.cn\/index.php\/wp-json\/wp\/v2\/media?parent=1336"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.nonot.cn\/index.php\/wp-json\/wp\/v2\/categories?post=1336"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.nonot.cn\/index.php\/wp-json\/wp\/v2\/tags?post=1336"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}