{"id":32,"date":"2024-05-26T11:14:40","date_gmt":"2024-05-26T03:14:40","guid":{"rendered":"https:\/\/www.iforz.cn\/?p=32"},"modified":"2024-05-26T11:14:40","modified_gmt":"2024-05-26T03:14:40","slug":"ssh%e6%97%a5%e5%b8%b8%e6%93%8d%e4%bd%9c","status":"publish","type":"post","link":"https:\/\/www.iforz.cn\/index.php\/2024\/05\/26\/ssh%e6%97%a5%e5%b8%b8%e6%93%8d%e4%bd%9c\/","title":{"rendered":"SSH\u65e5\u5e38\u64cd\u4f5c"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\u91cd\u542f\u670d\u52a1<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">systemctl restart sshd \u00a0<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>\u521b\u5efa\u79c1\u94a5\u4e0e\u516c\u94a5<\/strong><\/li>\n<\/ol>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u5728\u7ec8\u7aef\u4f7f\u7528 ssh-keygen \u547d\u4ee4\u3002<\/li>\n\n\n\n<li>ssh-keygen -t rsa -C\u00a0 &#8220;email&#8221; \u521b\u5efa\u5e26\u90ae\u7bb1\u7684\u516c\u94a5<\/li>\n\n\n\n<li>\u516c\u94a5\u662f\u8def\u5f84~\/.ssh\/id_rsa.pub \u91cc\u7684\u5185\u5bb9\u3002<\/li>\n\n\n\n<li>\u76ee\u6807\u670d\u52a1\u5668\u7684\u6388\u6743\u8def\u5f84~\/.ssh\/authorized_keys (\u6ca1\u6709\u5c31\u65b0\u5efa\u4e00\u4e2a)\u5199\u5165id_rsa.pub\u91cc\u7684\u5185\u5bb9\u3002<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">2. <strong>\u4fee\u6539ssh\u767b\u5f55\u7aef\u53e3<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># ssh \u914d\u7f6e\u6587\u4ef6\nInclude \/etc\/ssh\/sshd_config.d\/*.conf\n\nvim \/etc\/ssh\/sshd_config \n\n# \u4fee\u6539\u7aef\u53e3\nPort \n\n# \u7981\u7528\u767b\u5f55\nPasswordAuthentication no<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u91cd\u542f\u670d\u52a1 systemctl restart sshd \u00a0 2. \u4fee\u6539ssh\u767b\u5f55\u7aef\u53e3<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,5],"tags":[],"class_list":["post-32","post","type-post","status-publish","format-standard","hentry","category-incidents","category-code"],"_links":{"self":[{"href":"https:\/\/www.iforz.cn\/index.php\/wp-json\/wp\/v2\/posts\/32","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.iforz.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.iforz.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.iforz.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.iforz.cn\/index.php\/wp-json\/wp\/v2\/comments?post=32"}],"version-history":[{"count":1,"href":"https:\/\/www.iforz.cn\/index.php\/wp-json\/wp\/v2\/posts\/32\/revisions"}],"predecessor-version":[{"id":33,"href":"https:\/\/www.iforz.cn\/index.php\/wp-json\/wp\/v2\/posts\/32\/revisions\/33"}],"wp:attachment":[{"href":"https:\/\/www.iforz.cn\/index.php\/wp-json\/wp\/v2\/media?parent=32"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.iforz.cn\/index.php\/wp-json\/wp\/v2\/categories?post=32"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.iforz.cn\/index.php\/wp-json\/wp\/v2\/tags?post=32"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}