{"id":579,"date":"2020-10-02T21:48:55","date_gmt":"2020-10-02T13:48:55","guid":{"rendered":"<!-- wp:heading -->\n<h2>1. \u66f4\u6362\u6e90<\/h2>\n<!-- \/wp:heading -->\n\n<!-- wp:paragraph -->\n<p>\u8fd0\u884c lsb_release -c\uff0c\u67e5\u770b\u5bf9\u5e94\u7248\u672c\uff0c\u6211\u7684\u4e3abuster\u3002<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>\u8fd0\u884c sudo nano \/etc\/apt\/sources.list\uff0c\u589e\u52a0\u4e2d\u79d1\u5927\u548c\u963f\u91cc\u7684\u955c\u50cf\u3002<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp"},"modified":"2020-10-02T21:48:55","modified_gmt":"2020-10-02T13:48:55","slug":"%e6%a0%91%e8%8e%93%e6%b4%be-%e6%93%8d%e4%bd%9c%e8%ae%b0%e5%bd%95","status":"publish","type":"post","link":"https:\/\/blog.francis67.cc\/?p=579","title":{"rendered":"\u6811\u8393\u6d3e \u64cd\u4f5c\u8bb0\u5f55"},"content":{"rendered":"\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 eztoc-toggle-hide-by-default' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/blog.francis67.cc\/?p=579\/#1_%E6%9B%B4%E6%8D%A2%E6%BA%90\" >1. \u66f4\u6362\u6e90<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/blog.francis67.cc\/?p=579\/#2_SSH_Connection_closed_by_foreign_host\" >2. SSH Connection closed by foreign host<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/blog.francis67.cc\/?p=579\/#3_%E6%9B%B4%E6%94%B9%E6%97%B6%E5%8C%BA\" >3. \u66f4\u6539\u65f6\u533a<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/blog.francis67.cc\/?p=579\/#4_%E5%AE%89%E8%A3%85vim\" >4. \u5b89\u88c5vim<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/blog.francis67.cc\/?p=579\/#5_%E4%BD%BF%E7%94%A8windows_%E8%BF%9C%E7%A8%8B%E6%A1%8C%E9%9D%A2%E8%BF%9E%E6%8E%A5\" >5. \u4f7f\u7528windows \u8fdc\u7a0b\u684c\u9762\u8fde\u63a5<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/blog.francis67.cc\/?p=579\/#6_frp\" >6. frp<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"1_%E6%9B%B4%E6%8D%A2%E6%BA%90\"><\/span>1. \u66f4\u6362\u6e90<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>\u8fd0\u884c lsb_release -c\uff0c\u67e5\u770b\u5bf9\u5e94\u7248\u672c\uff0c\u6211\u7684\u4e3abuster\u3002<\/p>\n\n\n\n<p>\u8fd0\u884c sudo nano \/etc\/apt\/sources.list\uff0c\u589e\u52a0\u4e2d\u79d1\u5927\u548c\u963f\u91cc\u7684\u955c\u50cf\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">deb http:\/\/mirrors.aliyun.com\/raspbian\/raspbian\/ buster main non-free contrib<br>deb-src http:\/\/mirrors.aliyun.com\/raspbian\/raspbian\/ buster main non-free contrib<br>deb http:\/\/mirrors.ustc.edu.cn\/raspbian\/raspbian\/ buster main contrib non-free rpi<br>deb-src http:\/\/mirrors.ustc.edu.cn\/raspbian\/raspbian\/ buster main contrib non-free rpi<\/pre>\n\n\n\n<p>\u8fd0\u884c sudo apt-get update\uff0c\u66f4\u65b0\u7d22\u5f15<\/p>\n\n\n\n<p>\u8fd0\u884c sudo apt-get upgrade\uff0c\u66f4\u65b0\u8f6f\u4ef6<\/p>\n\n\n\n<p>\u8fd0\u884c sudo apt-get&nbsp;dist-upgrade\uff0c<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"2_SSH_Connection_closed_by_foreign_host\"><\/span>2. SSH Connection closed by foreign host<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ol class=\"wp-block-list\"><li>\u4fee\u6539\u8be5\u6587\u4ef6 \/etc\/ssh\/sshd_config<\/li><li>ClientAliveInterval 60<br>ClientAliveCountMax 3<\/li><li>\u91cd\u542fSSH\u670d\u52a1\uff0c<br>\/etc\/init.d\/ssh restart<br>systemctl restart sshd<\/li><\/ol>\n\n\n\n<p>\u8fd9\u4e2a\u95ee\u9898\u6700\u521d\u662f\u5728\u4f7f\u7528 sudo apt-get upgrade \u65f6\uff0cssh\u65ad\u5f00\u8fde\u63a5\u3002<\/p>\n\n\n\n<p><strong>\u89e3\u51b3\u65b9\u6cd5<\/strong>\uff1a\u4f7f\u7528GNU\u5c4f\u5e55\u3002\u5c4f\u5e55\u63d0\u4f9b\u4e86\u4e00\u4e2a\u865a\u62df\u7ec8\u7aef\uff0c\u5373\u4f7f\u60a8\u7684ssh\u8fde\u63a5\u4e22\u5931\uff0c\u8be5\u7ec8\u7aef\u4e5f\u53ef\u4ee5\u7ee7\u7eed\u8fd0\u884c\u3002<\/p>\n\n\n\n<p>sudo apt-get install screen\uff0c\u5b89\u88c5\u5c4f\u5e55<\/p>\n\n\n\n<p>screen\uff0c\u542f\u52a8\u5c4f\u5e55<\/p>\n\n\n\n<p>ctrl+a+d\uff0c\u6682\u65f6\u79bb\u5f00screen\uff0c<\/p>\n\n\n\n<p>screen r\uff0c\u91cd\u65b0\u8fde\u63a5screen<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"3_%E6%9B%B4%E6%94%B9%E6%97%B6%E5%8C%BA\"><\/span>3. \u66f4\u6539\u65f6\u533a<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>date\uff0c\u67e5\u770b\u5f53\u524d\u7cfb\u7edf\u65f6\u95f4<\/p>\n\n\n\n<p>sudo dpkg-reconfigure tzdata\uff0c\u9009\u62e9Asia\uff0cShanghai<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"4_%E5%AE%89%E8%A3%85vim\"><\/span>4. \u5b89\u88c5vim<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>sudo apt-get install vim<\/p>\n\n\n\n<p>\u914d\u7f6e\u53c2\u8003 <a href=\"https:\/\/blog.francis67.cc\/archives\/51\">https:\/\/www.<\/a><a href=\"https:\/\/blog.francis67.cc\/archives\/51\" target=\"_blank\" rel=\"noreferrer noopener\">francis67<\/a><a href=\"https:\/\/blog.francis67.cc\/archives\/51\">.cc\/archives\/51<\/a> <\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"5_%E4%BD%BF%E7%94%A8windows_%E8%BF%9C%E7%A8%8B%E6%A1%8C%E9%9D%A2%E8%BF%9E%E6%8E%A5\"><\/span>5. \u4f7f\u7528windows \u8fdc\u7a0b\u684c\u9762\u8fde\u63a5<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>sudo apt-get install xrdp\uff0c\u5b89\u88c5xdrp\u670d\u52a1<\/p>\n\n\n\n<p>\u4f7f\u7528windows\u81ea\u5e26\u7684\u8fdc\u7a0b\u684c\u9762\u8fde\u63a5\u5373\u53ef\u767b\u5f55\u3002\uff08\u524d\u63d0\u662f\u5b89\u88c5\u4e86<br>Raspberry Pi OS (32-bit) <strong>with desktop<\/strong>\uff0c\u5176\u4e2d\u5305\u62ec\u684c\u9762\u8f6f\u4ef6\uff09<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"6_frp\"><\/span>6. frp<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>\u4f7f\u7528\u547d\u4ee4\u884c\u4e0b\u8f7d\u5e76\u89e3\u538bfrp\u6700\u65b0\u7248\u672c<\/p>\n\n\n\n<p>wget https:\/\/github.com\/fatedier\/frp\/releases\/download\/v0.34.0\/frp_0.34.0_linux_amd.tar.gz<br>tar -zxvf frp_0.34.0_linux_amd.tar.gz<br>cd frp_0.34.0_linux_amd<br>\u4fee\u6539\u5ba2\u6237\u7aef\u914d\u7f6e frpc.ini\uff0c\u53ef\u53c2\u8003<a href=\"https:\/\/blog.francis67.cc\/archives\/537\">https:\/\/blog.francis67.cc\/archives\/537<\/a><\/p>\n\n\n\n<p>[common]\u4e3a\u5177\u6709\u516c\u7f51IP\u7684VPS\u7684\u914d\u7f6e\uff0c\u540c\u65f6\u4e3a\u6811\u8393\u6d3e\u589e\u52a0\u4e86[SSH]\u8fde\u63a5<\/p>\n\n\n\n<p>\u901a\u8fc7 frpc -c \/etc\/frpc.ini \u542f\u52a8\uff0c\u5e76\u4f7f\u7528systemctl\u5c06frp\u6dfb\u52a0\u5230\u670d\u52a1\u5b9e\u73b0\u5f00\u673a\u81ea\u542f\u52a8\u3002<\/p>\n\n\n\n<p>sudo vim \/lib\/systemd\/system\/frps.service<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[Unit]<br>Description=frps service<br><br>[Service]<br>Type=simple<br>Restart=always<br>RestartSec=20s<br># specific file path<br>ExecStart=\/xxx\/frpc -c \/xxx\/frpc.ini<br>ExecStop=\/bin\/kill $MAINPID<br><br>[Install]<br>WantedBy=multi-user.target<\/pre>\n\n\n\n<p>\u4f7f\u7528 sudo systemctl start frps \u542f\u52a8\u670d\u52a1\uff0c\u5e76\u6dfb\u52a0\u4e0b\u6b21\u91cd\u542f\u81ea\u542f\u52a8 sudo systemctl enable frps<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1. \u66f4\u6362\u6e90 \u8fd0\u884c lsb_release -c\uff0c\u67e5\u770b\u5bf9\u5e94\u7248\u672c\uff0c\u6211\u7684\u4e3abuster\u3002 \u8fd0\u884c sudo nano [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[212,211],"class_list":["post-579","post","type-post","status-publish","format-standard","hentry","category-vpslog","tag-raspberry-pi","tag-211"],"_links":{"self":[{"href":"https:\/\/blog.francis67.cc\/index.php?rest_route=\/wp\/v2\/posts\/579","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.francis67.cc\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.francis67.cc\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.francis67.cc\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.francis67.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=579"}],"version-history":[{"count":18,"href":"https:\/\/blog.francis67.cc\/index.php?rest_route=\/wp\/v2\/posts\/579\/revisions"}],"predecessor-version":[{"id":597,"href":"https:\/\/blog.francis67.cc\/index.php?rest_route=\/wp\/v2\/posts\/579\/revisions\/597"}],"wp:attachment":[{"href":"https:\/\/blog.francis67.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=579"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.francis67.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=579"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.francis67.cc\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=579"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}