{"id":178,"date":"2021-02-22T19:00:58","date_gmt":"2021-02-22T11:00:58","guid":{"rendered":"https:\/\/h.appstoreid.net\/?p=178"},"modified":"2022-07-13T14:36:20","modified_gmt":"2022-07-13T06:36:20","slug":"ax3600-ax3600%e3%80%81ax1800%e3%80%81ax5%e5%ae%98%e6%96%b9%e5%9b%ba%e4%bb%b6%e5%bc%80%e5%90%afssh%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/h.appstoreid.net\/?p=178","title":{"rendered":"[AX3600] AX3600\u3001AX1800\u3001AX5\u5b98\u65b9\u56fa\u4ef6\u5f00\u542fSSH\u65b9\u6cd5"},"content":{"rendered":"\n<p>\u8fdb\u5165\u8def\u7531\u590d\u5236\u4e32\u53f7\uff0c\u66ff\u6362\u4e0b\u9762\u7684\u5c0f\u5199stok\u7b49\u53f7\u53f3\u8fb9\u7684\u5927\u5199&lt;STOK&gt;\uff0c\u5e26\u7b26\u53f7\u4e00\u8d77\u66ff\u6362\uff0c\u4e0d\u8981\u8bf4\u8bef\u4eba\u5b50\u5f1f\uff0c\u7ec6\u5fc3\u7684\u590d\u5236\u4e32\u53f7\u5c31\u53ef\u5bf9\u6bd4\u53d1\u73b0<br>\u5f00ssh\u547d\u4ee4\uff1a<\/p>\n\n\n\n<p class=\"has-vivid-red-color has-text-color\">http:\/\/192.168.31.1\/cgi-bin\/luci\/;stok=&lt;STOK&gt;\/api\/misystem\/set_config_iotdev?bssid=Xiaomi&user_id=longdike&ssid=-h%3B%20nvram%20set%20ssh_en%3D1%3B%20nvram%20commit%3B%20sed%20-i%20's%2Fchannel%3D.*%2Fchannel%3D%5C%22debug%5C%22%2Fg'%20%2Fetc%2Finit.d%2Fdropbear%3B%20%2Fetc%2Finit.d%2Fdropbear%20start%3B<\/p>\n\n\n\n<p>\u6539\u5bc6\u7801\u547d\u4ee4(\u5fc5\u987b\u6539\u5bc6\u7801\uff0c\u4e0d\u6539\u5bc6\u7801\u65e0\u6cd5\u8fde\u63a5ssh)\uff1a\u6539\u5bc6\u7801\u4e3aadmin<\/p>\n\n\n\n<p class=\"has-vivid-red-color has-text-color\">http:\/\/192.168.31.1\/cgi-bin\/luci\/;stok=&lt;STOK&gt;\/api\/misystem\/set_config_iotdev?bssid=Xiaomi&user_id=longdike&ssid=-h%3B%20echo%20-e%20'admin%5Cnadmin'%20%7C%20passwd%20root%3B<\/p>\n\n\n\n<p><strong>\u6539\u6210\u4e00\u884c<\/strong><\/p>\n\n\n\n<p class=\"has-vivid-red-color has-text-color\">http:\/\/192.168.31.1\/cgi-bin\/luci\/;stok=&lt;STOK&gt;\/api\/misystem\/set_config_iotdev?bssid=Xiaomi&user_id=longdike&ssid=-h%3B%20nvram%20set%20ssh_en%3D1%3B%20nvram%20commit%3B%20sed%20-i%20's%2Fchannel%3D.*%2Fchannel%3D%5C%22debug%5C%22%2Fg'%20%2Fetc%2Finit.d%2Fdropbear%3B%20%2Fetc%2Finit.d%2Fdropbear%20start%3B%20echo%20-e%20'admin%5Cnadmin'%20%7C%20passwd%20root%3B<\/p>\n\n\n\n<p>\u7ea2\u7c73ax5 1.0.26 <a rel=\"noreferrer noopener\" href=\"https:\/\/designhome.lanzoui.com\/iMfH1m0ar3c\" target=\"_blank\">\u56fa\u4ef6\u4e0b\u8f7d<\/a><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u5347\u7ea7\u540e\u9632\u6b62ssh\u5931\u6548\u65b9\u6cd5\uff1a<\/h4>\n\n\n\n<p>\u5728 \/etc\/firewall.user \u6587\u4ef6\u4e2d\uff0c\u6dfb\u52a0\u4e00\u53e5 source \/etc\/basic_settings\/basefile.sh<br>\u867d\u7136\u53ef\u4ee5\u76f4\u63a5\u5199\u811a\u672c\uff0c\u4f46\u6bd5\u7adf\u8fd9\u91cc\u662f\u5199\u9632\u706b\u5899\u89c4\u5219\u7684\u5730\u65b9\uff0c\u4e3a\u4e86\u770b\u8d77\u6765\u7f8e\u89c2\uff0c\u53easource\u4e00\u4e2a\u811a\u672c\uff0c\u628a\u4e3b\u8981\u547d\u4ee4\u5199\u5728\u522b\u7684\u5730\u65b9\u3002<\/p>\n\n\n\n<ol class=\"has-light-green-cyan-background-color has-background wp-block-list\"><li>echo -e \"\\nsource \/etc\/basic_settings\/basefile.sh\" &gt;&gt; \/etc\/firewall.user<\/li><\/ol>\n\n\n\n<h5 class=\"wp-block-heading\">\u521b\u5efa basic_settings \u6587\u4ef6\u5939\u3001basefile.sh \u6587\u4ef6\u3001my_script.sh \u6587\u4ef6<\/h5>\n\n\n\n<ol class=\"has-light-green-cyan-background-color has-background wp-block-list\"><li>mkdir \/etc\/basic_settings<\/li><li>touch \/etc\/basic_settings\/basefile.sh<\/li><li>touch \/etc\/basic_settings\/my_script.sh<\/li><li>chmod 755 \/etc\/basic_settings\/basefile.sh<\/li><li>chmod 755 \/etc\/basic_settings\/my_script.sh<\/li><\/ol>\n\n\n\n<h5 class=\"wp-block-heading\">\u7f16\u8f91 \/etc\/basic_settings\/basefile.sh \u586b\u5199\u4ee5\u4e0b\u5185\u5bb9<\/h5>\n\n\n\n<ol class=\"has-light-green-cyan-background-color has-background wp-block-list\"><li>echo \"source \/etc\/basic_settings\/my_script.sh; exit 0\" &gt; \/etc\/rc.local<\/li><\/ol>\n\n\n\n<h5 class=\"wp-block-heading\">\u7f16\u8f91 \/etc\/basic_settings\/my_script.sh \u586b\u5199\u4ee5\u4e0b\u5185\u5bb9<\/h5>\n\n\n\n<ol class=\"has-light-green-cyan-background-color has-background wp-block-list\"><li>ver_flag=\"$(uci -c \/usr\/share\/xiaoqiang get xiaoqiang_version.version.CHANNEL)\"<\/li><li>if [ \"$(nvram get ssh_en)\" != \"1\" -o \"$ver_flag\" == \"release\" ]; then<\/li><li>echo \"$(date) : \u672c\u6b21\u5f00\u673assh_en\u88ab\u5173\u95ed\u6216\u8005\u7248\u672c\u6807\u8bb0\u88ab\u91cd\u7f6e\uff0c\u60a8\u53ef\u80fd\u8fdb\u884c\u4e86\u56fa\u4ef6\u5347\u7ea7\u3002\" &gt;&gt; \/tmp\/my_log.txt<\/li><li>nvram set ssh_en=1<\/li><li>nvram commit<\/li><li>uci -c \/usr\/share\/xiaoqiang set xiaoqiang_version.version.CHANNEL='stable'<\/li><li>uci -c \/usr\/share\/xiaoqiang commit xiaoqiang_version.version<\/li><li>echo \"$(date) :\u5df2\u91cd\u65b0\u5f00\u542fssh_en\uff0c\u5e76\u8bbe\u7f6e\u7248\u672c\u6807\u8bb0\u4e3astable\u3002\" &gt;&gt; \/tmp\/my_log.txt<\/li><li>\/etc\/init.d\/dropbear enabled<\/li><li>if [ $? == \"1\" ]; then<\/li><li>echo \"$(date) :dropbear\u5f00\u673a\u81ea\u542f\u52a8\u88ab\u5173\u95ed\uff0c\u73b0\u91cd\u65b0\u5f00\u542f\u3002\" &gt;&gt; \/tmp\/my_log.txt<\/li><li>\/etc\/init.d\/dropbear enable<\/li><li>fi<\/li><li>\/etc\/init.d\/dropbear restart<\/li><li>echo -e \"admin\\nadmin\" | passwd root<\/li><li>echo \"$(date) :\u5df2\u5c06root\u5bc6\u7801\u91cd\u7f6e\u4e3a admin\" &gt;&gt; \/tmp\/my_log.txt<\/li><li>fi<\/li><\/ol>\n\n\n\n<p>\u6765\u6e90\uff1a<a href=\"https:\/\/blog.csdn.net\/qq1337715208\/article\/details\/122990265\">\u5173\u4e8e\u5c0f\u7c73\u8def\u7531\u5668\u5347\u7ea7\u7cfb\u7edf\u4fdd\u7559SSH\u7684\u7b80\u5355\u65b9\u6cd5\uff08RedmiAX5\u5b9e\u9a8c\uff09_\u9526\u590f\u633d\u79cb\u7684\u535a\u5ba2-CSDN\u535a\u5ba2_\u5c0f\u7c73\u8def\u7531\u5668ssh<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8fdb\u5165\u8def\u7531\u590d\u5236\u4e32\u53f7\uff0c\u66ff\u6362\u4e0b\u9762\u7684\u5c0f\u5199stok\u7b49\u53f7\u53f3\u8fb9\u7684\u5927\u5199&lt;STOK&gt;\uff0c\u5e26\u7b26\u53f7\u4e00\u8d77\u66ff\u6362\uff0c\u4e0d\u8981\u8bf4\u8bef\u4eba\u5b50\u5f1f [&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":[],"class_list":["post-178","post","type-post","status-publish","format-standard","hentry","category-rjfx"],"_links":{"self":[{"href":"https:\/\/h.appstoreid.net\/index.php?rest_route=\/wp\/v2\/posts\/178","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/h.appstoreid.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/h.appstoreid.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/h.appstoreid.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/h.appstoreid.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=178"}],"version-history":[{"count":14,"href":"https:\/\/h.appstoreid.net\/index.php?rest_route=\/wp\/v2\/posts\/178\/revisions"}],"predecessor-version":[{"id":324,"href":"https:\/\/h.appstoreid.net\/index.php?rest_route=\/wp\/v2\/posts\/178\/revisions\/324"}],"wp:attachment":[{"href":"https:\/\/h.appstoreid.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=178"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/h.appstoreid.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=178"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/h.appstoreid.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=178"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}