{"id":7713,"date":"2021-10-19T12:53:18","date_gmt":"2021-10-19T04:53:18","guid":{"rendered":"http:\/\/jc.a300.cn/luyouwang\/?p=7713"},"modified":"2022-05-14T16:33:31","modified_gmt":"2022-05-14T08:33:31","slug":"%e5%b0%8f%e7%b1%b3ac2100%e5%bc%80%e5%90%afssh-%e5%88%b7%e9%92%9b%e6%98%9f%e4%ba%ba%e5%9b%ba%e4%bb%b6%e5%9b%be%e6%96%87%e6%95%99%e7%a8%8b","status":"publish","type":"post","link":"http:\/\/jc.a300.cn/luyouwang\/7713.html","title":{"rendered":"\u5c0f\u7c73AC2100\u5f00\u542fSSH \u5237\u949b\u661f\u4eba\u56fa\u4ef6\u56fe\u6587\u6559\u7a0b"},"content":{"rendered":"

\u672c\u6559\u7a0b\u7531\u8def\u7531\u7f51\u9996\u53d1\uff0c\u949b\u661f\u4eba\u56fa\u4ef6\u76ee\u524d\u5df2\u7ecf\u652f\u6301\u5c0f\u7c73\u8def\u7531\u5668AC2100\uff0c\u540e\u7eed\u5c06\u652f\u6301\u66f4\u591a\u7684\u5c0f\u7c73\u8def\u7531\u5668\u578b\u53f7\u4ee5\u53ca\u5176\u4ed6\u54c1\u724c\u7684\u8def\u7531\u5668\u578b\u53f7\u3002\u672c\u6587\u7ed9\u5927\u5bb6\u5e26\u6765\u5c0f\u7c73\u8def\u7531\u5668AC2100\u5f00\u542fSSH\uff0c\u5237\u949b\u661f\u4eba\u56fa\u4ef6\u56fe\u6587\u6559\u7a0b\uff1b\u53cb\u60c5\u63d0\u793a\uff1a\u5c0f\u7c73\u5305\u62ec\u7ea2\u7c73\u7684\u5237\u673a\u6b65\u9aa4\u90fd\u4e00\u6837\uff0c\u4e0d\u4e00\u6837\u662f\u7684\u4e13\u7528\u56fa\u4ef6\u4e0e\u4e00\u4e9b\u4ee3\u7801\u3002<\/span><\/p>\n

\"\u5c0f\u7c73AC2100<\/a>
\u5c0f\u7c73AC2100 \u5237\u949b\u661f\u4eba\u56fa\u4ef6<\/figcaption><\/figure>\n

\u4e3a\u4e86\u9632\u6b62\u8585\u7f8a\u6bdb\uff0c\u76ee\u524d\u6ca1\u6709\u5f00\u53d1\u51fa\u5237\u56de\u7684\u65b9\u6cd5\u3002<\/strong><\/span><\/p>\n

\u5982\u679c\u6ca1\u6709\u8fd9\u4e9b\u52a0\u901f\u9700\u6c42\u7684\u4eba\uff0c\u8bf7\u4e0d\u8981\u5237\u672c\u56fa\u4ef6\uff0c\u8c22\u8c22\uff01<\/strong><\/span><\/p>\n

\u4e00\u3001\u5148\u628a\u8def\u7531\u5668\u56fa\u4ef6\u5347\u7ea7\u5230V2.0.23\u7248\u672c<\/h3>\n

\u7136\u540e\u767b\u9646\u5c0f\u7c73\u8def\u7531\u7ba1\u7406\u540e\u53f0192.168.31.1\uff0c\u5347\u7ea7\u9875\u9762\u4e0b\u5bfc\u5165\u56fa\u4ef6\u5347\u7ea7\u3002<\/p>\n

 <\/p>\n

\u4e0b\u8f7d\u5b8c\u89e3\u538b\u540e\u5982\u4e0b\uff1a<\/p>\n

\"\u5c0f\u7c73AC2100\u56fa\u4ef6\u8ddf\u5237\u673a\u5de5\u5177\"<\/a>
\u5c0f\u7c73AC2100\u56fa\u4ef6\u8ddf\u5237\u673a\u5de5\u5177<\/figcaption><\/figure>\n

1\u3001\u5c0f\u7c73\u8def\u7531\u5668\u540e\u53f0\u7ba1\u7406\u9875\u9762\u4e0b\uff0c\u70b9\u51fb\u624b\u52a8\u5347\u7ea7\u521a\u521a\u4e0b\u8f7d\u7684\u56fa\u4ef6\u3002<\/p>\n

\"\u624b\u52a8\u5347\u7ea7\"<\/a>
\u624b\u52a8\u5347\u7ea7<\/figcaption><\/figure>\n

2\u3001\u6ce8\u610f\u4e0a\u4f20\u56fa\u4ef6\u4e00\u5b9a\u8981\u52fe\u9009\u201c\u6e05\u9664\u7528\u6237\u6240\u6709\u914d\u7f6e\u201d\uff0c\u5982\u4e0b\u56fe\u6240\u793a\u3002<\/p>\n

\"\u6e05\u9664\u7528\u6237\u6240\u6709\u914d\u7f6e\"<\/a>
\u6e05\u9664\u7528\u6237\u6240\u6709\u914d\u7f6e<\/figcaption><\/figure>\n

\u5347\u7ea7\u6210\u529f\u540e\u8def\u7531\u5668\u4e3a\u6062\u590d\u51fa\u5382\u72b6\u6001\uff0c\u767b\u9646\u8def\u7531\u5668\u7ba1\u7406\u9875\u9762\u7684\u65f6\u5019\u8fdb\u5165\u8bbe\u7f6e\u9875\u9762\u65f6\u5019\u53d6\u6d88\uff1a\u201c\u7a7a\u95f2\u65f6\u95f4\u81ea\u52a8\u5347\u7ea7\u201d<\/span>\uff0c\u907f\u514d\u56de\u9000\u7248\u672c\u540e\u53c8\u81ea\u52a8\u7ed9\u5347\u7ea7\u4e86\u3002<\/p>\n

\"\u53d6\u6d88\u7a7a\u95f2\u65f6\u95f4\u81ea\u52a8\u5347\u7ea7\"<\/a>
\u53d6\u6d88\u7a7a\u95f2\u65f6\u95f4\u81ea\u52a8\u5347\u7ea7<\/figcaption><\/figure>\n

 <\/p>\n

\u4e8c\u3001\u5f00\u542fssh<\/h3>\n

1\u3001\u6211\u4eec\u5148\u767b\u5f55192.168.31.1\u5c0f\u7c73\u8def\u7531\u5668\u6d4f\u89c8\u5668\u7684\u7ba1\u7406\u9875\u9762\uff0c\u5982\u4e0b\u56fe\u6240\u793a\uff0c\u7136\u540e\u5c31\u5728\u8fd9\u4e2a\u6d4f\u89c8\u5668\u5c0f\u7c73\u767b\u5f55\u597d\u7684\u9875\u9762\u4e0b\u70b9\u51fb\u952e\u76d8\u201cF12\u201d \uff0c\u9009\u62e9 \u201cconsole\u201d \uff0c\u6587\u672c\u4ee3\u7801\u4e0b\u8f7d\u94fe\u63a5\u6587\u4ef6\u91cc\u4e5f\u6709\uff08\u6253\u5f00ssh\u7684\u547d\u4ee4.txt\uff09<\/p>\n

\"console\"<\/a>
console<\/figcaption><\/figure>\n

\u6253\u5f00ssh\u65b9\u6cd5\u5982\u4e0b\uff1a<\/strong><\/p>\n

\u8fd9\u91cc\uff0c\u6211\u4eec\u4f7f\u7528openwrt\u5b98\u65b9\u63d0\u4f9b\u7684\u65b9\u6cd5\u6253\u5f00ssh<\/p>\n

\u767b\u5f55\u8def\u7531\u5668\u7ba1\u7406\u754c\u9762\uff0c\u6309f12\u6253\u5f00\u5f00\u53d1\u8005\u5de5\u5177devtool\uff0c\u70b9\u51fbconsole\uff0c\u8f93\u5165\u4e0b\u5217\u4ee3\u7801\uff0c\u5e76\u56de\u8f66\u3002<\/p>\n

function getSTOK() {\r\n    let match = location.href.match(\/;stok=(.*?)\\\/\/);\r\n    if (!match) {\r\n        return null;\r\n    }\r\n    return match[1];\r\n}\r\n\r\nfunction execute(stok, command) {\r\n    command = encodeURIComponent(command);\r\n    let path = `\/cgi-bin\/luci\/;stok=${stok}\/api\/misystem\/set_config_iotdev?bssid=SteelyWing&user_id=SteelyWing&ssid=-h%0A${command}%0A`;\r\n    console.log(path);\r\n    return fetch(new Request(location.origin + path));\r\n}\r\n\r\nfunction enableSSH() {\r\n    stok = getSTOK();\r\n    if (!stok) {\r\n        console.error('stok not found in URL');\r\n        return;\r\n    }\r\n    console.log(`stok = \"${stok}\"`);\r\n\r\n    password = prompt('Input new SSH password');\r\n    if (!password) {\r\n        console.error('You must input password');\r\n        return;\r\n    }\r\n\r\n    execute(stok, \r\n`\r\nnvram set ssh_en=1\r\nnvram commit\r\nsed -i 's\/channel=.*\/channel=\\\\\"debug\\\\\"\/g' \/etc\/init.d\/dropbear\r\n\/etc\/init.d\/dropbear start\r\n`\r\n    )\r\n        .then((response) => response.text())\r\n        .then((text) => console.log(text));\r\n    console.log('New SSH password: ' + password);\r\n    execute(stok, `echo -e \"${password}\\\\n${password}\" | passwd root`)\r\n        .then((response) => response.text())\r\n        .then((text) => console.log(text));\r\n}\r\n\r\nenableSSH();<\/pre>\n
\"\u5f00\u542fSSH\"<\/a>
\u5f00\u542fSSH<\/figcaption><\/figure>\n

 <\/p>\n

\u4e09\u3001\u5347\u7ea7\u949b\u661f\u4eba\u56fa\u4ef6<\/h3>\n

1\u3001\u6253\u5f00putty.exe\u5de5\u5177\uff08\u5c31\u662f\u6211\u4eec\u7b2c\u4e00\u6b65\u767e\u5ea6\u7f51\u76d8\u4e0b\u8f7d\u7684\u538b\u7f29\u6587\u4ef6\u5185\uff09\uff0c\u586b\u5199\u5982\u4e0b\u4fe1\u606f\u3002<\/p>\n

\"putty\"<\/a>
putty<\/figcaption><\/figure>\n

 <\/p>\n

2\u3001\u70b9\u51fbopen\u540e\uff0c\u5982\u4e0b\u56fe\u6240\u793a<\/p>\n

\u8f93\u5165\u8d26\u6237\u540d\uff1aroot<\/p>\n

\"root\"<\/a>
root<\/figcaption><\/figure>\n

3\u3001\u8f93\u5165\u5bc6\u94a5\u5319\uff1aroot\u00a0 \u5982\u4e0b\u56fe\u6240\u793a\u3002<\/p>\n

 <\/p>\n

4\u3001\u5982\u4e0b\u56fe\u6240\u793a\u8fdb\u5165\u547d\u4ee4\u6846\u540e\u518d\u6b21\u8f93\u5165\u5982\u4e0b\u547d\u4ee4<\/p>\n

\uff08\u6216\u8005\u5728\u4e0b\u8f7d\u7684\u6587\u4ef6\u91cc\u627e\u5230\u6700\u540e\u4e00\u6b65\u7684\u5347\u7ea7\u547d\u4ee4+\u76f4\u63a5\u590d\u5236.txt\uff09<\/p>\n

\u8bf4\u660e\uff1a\u4e0b\u9762\u547d\u4ee4\u662f\u4e00\u884c\u5b8c\u6574\u7684\uff0c\u76f4\u63a5\u6253\u5f00\u590d\u5236\u7c98\u8d34\u5c31\u884c\u4e86<\/p>\n

cd \/tmp;rm -rf jxgo*;wget http:\/\/jixun-router.oss-cn-hangzhou.aliyuncs.com\/config\/extcmd\/AC2100\/jxgo;chmod +x jxgo;\/tmp\/jxgo>\/etc\/jxdbg 2>&1<\/pre>\n

\u8f93\u5165\u5b8c\u6bd5\u540e\uff0c\u56de\u8f66\u5c31\u81ea\u52a8\u4e0b\u8f7d\u5b8c\u6210\u5347\u7ea7\u4e86\uff08\u7b2c\u4e00\u65f6\u95f4\uff0c\u5929\u84dd\u8272\u706f\u7184\u706d\u53d8\u7ea2\u91cd\u542f\uff09<\/p>\n

\"\u5347\u7ea7\u949b\u661f\u4eba\u56fa\u4ef6\"<\/a>
\u5347\u7ea7\u949b\u661f\u4eba\u56fa\u4ef6<\/figcaption><\/figure>\n

 <\/p>\n

\u56db\u3001\u6700\u540e\u6b65\u9aa4<\/h3>\n

\u5237\u673a\u5b8c\u6210\uff0c\u8def\u7531\u5668\u91cd\u542f\u540e\u8fdb\u5165\u949b\u661f\u4eba\u56fa\u4ef6UI\u5982\u4e0b\u56fe\u6240\u793a\uff1a<\/p>\n

SSID\u53d8\u66f4\u4e3a\uff1aTaiXingren_2.4G_xxxx\uff0cTaiXingren_5G_xxxx\uff08XXXX\u4e3amac\u5730\u5740\u540e\u56db\u4f4d\uff09<\/p>\n

\u767b\u5f55\u5bc6\u7801\u662f\uff1aadmin<\/p>\n

\u65e0\u7ebf\u9ed8\u8ba4\u5bc6\u7801\u662f\uff1a12345678<\/p>\n

\u4e0b\u8f7d\u4f5c\u56fe\u949b\u661f\u4eba\u5b98\u65b9APP\uff0c\u5c31\u53ef\u4ee5\u6b63\u5f0f\u5f00\u542f\u6e38\u620f\u5168\u9762\u52a0\u901f\u4e4b\u65c5\u4e86\u3002<\/p>\n

\u5199\u5728\u6700\u540e\uff1a\u5237\u673a\u524d\u4e00\u5b9a\u8981\u628aAc2100\u7684\u56fa\u4ef6\u5347\u7ea7\u5230\u7b2c\u4e00\u6b65\u4e0b\u8f7d\u7684\u5347\u7ea7\u6587\u4ef6\uff0c\u4e0d\u7136\u4f1a\u5237\u673a\u5931\u8d25\u3002<\/p>\n

\"\u5237\u673a\u5b8c\u6210\"<\/a>
\u5237\u673a\u5b8c\u6210<\/figcaption><\/figure>\n","protected":false},"excerpt":{"rendered":"

\u672c\u6559\u7a0b\u7531\u8def\u7531\u7f51\u9996\u53d1\uff0c\u949b\u661f\u4eba\u56fa\u4ef6\u76ee\u524d\u5df2\u7ecf\u652f\u6301\u5c0f\u7c73\u8def\u7531\u5668AC2100\uff0c\u540e\u7eed\u5c06\u652f\u6301\u66f4\u591a\u7684\u5c0f\u7c73\u8def\u7531\u5668\u578b\u53f7\u4ee5\u53ca\u5176\u4ed6\u54c1\u724c\u7684\u8def\u7531\u5668\u578b\u53f7\u3002\u672c\u6587\u7ed9\u5927\u5bb6\u5e26\u6765\u5c0f\u7c73\u8def\u7531\u5668AC2100\u5f00\u542fSSH\uff0c\u5237\u949b\u661f\u4eba\u56fa\u2026<\/p>\n","protected":false},"author":1,"featured_media":7714,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,2059],"tags":[1371,2147,2146,2061,2079],"attr":[],"class_list":{"0":"post-7713","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","6":"hentry","7":"category-miwifi","8":"category-txr","9":"tag-ac2100","11":"tag-ac2100ssh","12":"tag-2061","13":"tag-2079","14":"entry"},"views":9980,"_links":{"self":[{"href":"http:\/\/jc.a300.cn/luyouwang\/wp-json\/wp\/v2\/posts\/7713","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/jc.a300.cn/luyouwang\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/jc.a300.cn/luyouwang\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/jc.a300.cn/luyouwang\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/jc.a300.cn/luyouwang\/wp-json\/wp\/v2\/comments?post=7713"}],"version-history":[{"count":0,"href":"http:\/\/jc.a300.cn/luyouwang\/wp-json\/wp\/v2\/posts\/7713\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/jc.a300.cn/luyouwang\/wp-json\/wp\/v2\/media\/7714"}],"wp:attachment":[{"href":"http:\/\/jc.a300.cn/luyouwang\/wp-json\/wp\/v2\/media?parent=7713"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/jc.a300.cn/luyouwang\/wp-json\/wp\/v2\/categories?post=7713"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/jc.a300.cn/luyouwang\/wp-json\/wp\/v2\/tags?post=7713"},{"taxonomy":"attr","embeddable":true,"href":"http:\/\/jc.a300.cn/luyouwang\/wp-json\/wp\/v2\/attr?post=7713"}],"curies":[{"name":"wp","href":"http:\/\/api.w.org\/{rel}","templated":true}]}}