{"id":1623,"date":"2025-10-31T21:54:05","date_gmt":"2025-10-31T13:54:05","guid":{"rendered":"https:\/\/www.vcidc.net\/blog\/?p=1623"},"modified":"2025-10-31T21:54:05","modified_gmt":"2025-10-31T13:54:05","slug":"%e5%a6%82%e4%bd%95%e4%bc%98%e5%8c%96%e5%85%a8%e7%90%83%e4%b8%8a%e7%bd%91%e4%bd%93%e9%aa%8c%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/www.vcidc.net\/blog\/1623.html","title":{"rendered":"\u5982\u4f55\u4f18\u5316\u5168\u7403\u4e0a\u7f51\u4f53\u9a8c\uff1f"},"content":{"rendered":"<p><h2>\u6280\u672f\u7b80\u4ecb\u4e0e\u4efb\u52a1\u6982\u8ff0<\/h2>\n<\/p>\n<p style=\"text-align:center\"><img decoding=\"async\" src=\"https:\/\/www.vcidc.net\/blog\/wp-content\/uploads\/2025\/07\/44DOsuOZ65.jpg\" alt=\"\u5982\u4f55\u4f18\u5316\u5168\u7403\u4e0a\u7f51\u4f53\u9a8c\uff1f\" title=\"\u5982\u4f55\u4f18\u5316\u5168\u7403\u4e0a\u7f51\u4f53\u9a8c\uff1f\"><\/p>\n<p>\u5168\u7403\u4e0a\u7f51\u6280\u672f\u662f\u6307\u901a\u8fc7\u4e92\u8054\u7f51\u8fde\u63a5\u5168\u7403\u5404\u5730\u7684\u7528\u6237\uff0c\u5b9e\u73b0\u4fe1\u606f\u7684\u5168\u7403\u5171\u4eab\u548c\u4ea4\u6d41\u3002\u672c\u6587\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528SSH\u96a7\u9053\u6280\u672f\u5b9e\u73b0\u5168\u7403\u4e0a\u7f51\uff0c\u5305\u62ec\u64cd\u4f5c\u6b65\u9aa4\u3001\u547d\u4ee4\u793a\u4f8b\u53ca\u6ce8\u610f\u4e8b\u9879\u3002<\/p>\n<p><h2>\u64cd\u4f5c\u6b65\u9aa4<\/h2>\n<\/p>\n<p><h3>\u6b65\u9aa4\u4e00\uff1a\u9009\u62e9SSH\u96a7\u9053\u670d\u52a1<\/h3>\n<\/p>\n<p>\u9996\u5148\uff0c\u60a8\u9700\u8981\u9009\u62e9\u4e00\u5bb6\u53ef\u9760\u7684SSH\u96a7\u9053\u670d\u52a1\u63d0\u4f9b\u5546\u3002\u5e02\u9762\u4e0a\u6709\u8bb8\u591a\u514d\u8d39\u548c\u4ed8\u8d39\u7684SSH\u96a7\u9053\u670d\u52a1\uff0c\u53ef\u4ee5\u6839\u636e\u81ea\u5df1\u7684\u9700\u6c42\u8fdb\u884c\u9009\u62e9\u3002<\/p>\n<p><h3>\u6b65\u9aa4\u4e8c\uff1a\u83b7\u53d6SSH\u96a7\u9053\u5730\u5740\u548c\u7aef\u53e3<\/h3>\n<\/p>\n<p>\u6ce8\u518c\u5e76\u767b\u5f55SSH\u96a7\u9053\u670d\u52a1\u540e\uff0c\u60a8\u53ef\u4ee5\u5728\u670d\u52a1\u63d0\u4f9b\u5546\u7684\u5b98\u7f51\u4e0a\u627e\u5230\u81ea\u5df1\u7684SSH\u96a7\u9053\u5730\u5740\u548c\u7aef\u53e3\u3002<\/p>\n<p><h3>\u6b65\u9aa4\u4e09\uff1a\u914d\u7f6eSSH\u5ba2\u6237\u7aef<\/h3>\n<\/p>\n<p>\u4ee5Windows\u7cfb\u7edf\u4e3a\u4f8b\uff0c\u60a8\u9700\u8981\u4e0b\u8f7d\u5e76\u5b89\u88c5SSH\u5ba2\u6237\u7aef\uff0c\u5982PuTTY\u3002\u4ee5\u4e0b\u662f\u914d\u7f6ePuTTY\u7684\u6b65\u9aa4\uff1a<\/p>\n<ol>\n<li>\u6253\u5f00PuTTY\u3002<\/li>\n<li>\u5728\u201cHost Name (or IP address)\u201d\u680f\u4e2d\u8f93\u5165\u60a8\u7684SSH\u96a7\u9053\u5730\u5740\u3002<\/li>\n<li>\u5728\u201cPort\u201d\u680f\u4e2d\u8f93\u5165SSH\u96a7\u9053\u7aef\u53e3\u3002<\/li>\n<li>\u70b9\u51fb\u201cOpen\u201d\u6309\u94ae\uff0c\u6253\u5f00SSH\u96a7\u9053\u8fde\u63a5\u3002<\/li>\n<\/ol>\n<p><h3>\u6b65\u9aa4\u56db\uff1a\u914d\u7f6eSSH\u5ba2\u6237\u7aef\u4ee3\u7406\u8bbe\u7f6e<\/h3>\n<\/p>\n<p>\u5728PuTTY\u7684\u914d\u7f6e\u754c\u9762\u4e2d\uff0c\u627e\u5230\u201cConnection\u201d -> \u201cSSH\u201d -> \u201cTunnel\u201d\u9009\u9879\u5361\u3002<\/p>\n<ol>\n<li>\u52fe\u9009\u201cEnable SSH tunneling\u201d\u3002<\/li>\n<li>\u5728\u201cSource port\u201d\u680f\u4e2d\u8f93\u5165\u672c\u5730\u7aef\u53e3\uff0c\u59821080\u3002<\/li>\n<li>\u5728\u201cDestination\u201d\u680f\u4e2d\u8f93\u5165SSH\u96a7\u9053\u5730\u5740\u548c\u7aef\u53e3\uff0c\u683c\u5f0f\u4e3a\u201cSSH\u96a7\u9053\u5730\u5740:SSH\u96a7\u9053\u7aef\u53e3\u201d\u3002<\/li>\n<li>\u70b9\u51fb\u201cAdd\u201d\u6309\u94ae\u6dfb\u52a0\u96a7\u9053\u3002<\/li>\n<\/ol>\n<p><h3>\u6b65\u9aa4\u4e94\uff1a\u8bbe\u7f6e\u4ee3\u7406<\/h3>\n<\/p>\n<p>\u5728\u60a8\u7684\u6d4f\u89c8\u5668\u6216\u5176\u4ed6\u5e94\u7528\u7a0b\u5e8f\u4e2d\uff0c\u8bbe\u7f6e\u4ee3\u7406\u670d\u52a1\u5668\u4e3a\u6b65\u9aa4\u4e09\u4e2d\u914d\u7f6e\u7684\u672c\u5730\u7aef\u53e3\uff08\u59821080\uff09\u3002<\/p>\n<p><h2>\u547d\u4ee4\u793a\u4f8b\u53ca\u89e3\u91ca<\/h2>\n<\/p>\n<p>\u4ee5\u4e0b\u662f\u4e00\u4e2a\u4f7f\u7528SSH\u5ba2\u6237\u7aef\u547d\u4ee4\u884c\u5de5\u5177\u5b9e\u73b0SSH\u96a7\u9053\u7684\u793a\u4f8b\uff1a<\/p>\n<p><pre><code>ssh -L 1080:localhost:80 user@ssh-tunnel-service.com<\/p>\r\n<p><\/code><\/pre>\n<\/p>\n<p>\u89e3\u91ca\uff1a<\/p>\n<p>&#8211; `-L` \u53c2\u6570\u8868\u793a\u8bbe\u7f6eSSH\u96a7\u9053\u3002<\/p>\n<p>&#8211; `1080` \u8868\u793a\u672c\u5730\u7aef\u53e3\uff0c\u60a8\u53ef\u4ee5\u6839\u636e\u81ea\u5df1\u7684\u9700\u6c42\u4fee\u6539\u3002<\/p>\n<p>&#8211; `localhost:80` \u8868\u793aSSH\u96a7\u9053\u7684\u76ee\u6807\u5730\u5740\u548c\u7aef\u53e3\uff0c\u60a8\u53ef\u4ee5\u6839\u636e\u81ea\u5df1\u7684\u9700\u6c42\u4fee\u6539\u3002<\/p>\n<p>&#8211; `user@ssh-tunnel-service.com` \u8868\u793aSSH\u96a7\u9053\u670d\u52a1\u7684\u7528\u6237\u540d\u548c\u5730\u5740\u3002<\/p>\n<p><h2>\u6ce8\u610f\u4e8b\u9879<\/h2>\n<\/p>\n<ul>\n<li>\u5728\u4f7f\u7528SSH\u96a7\u9053\u4e4b\u524d\uff0c\u8bf7\u786e\u4fdd\u60a8\u7684\u8bbe\u5907\u5df2\u8fde\u63a5\u5230\u4e92\u8054\u7f51\u3002<\/li>\n<li>\u9009\u62e9\u53ef\u9760\u7684SSH\u96a7\u9053\u670d\u52a1\u63d0\u4f9b\u5546\uff0c\u786e\u4fdd\u60a8\u7684\u4fe1\u606f\u5b89\u5168\u3002<\/li>\n<li>\u914d\u7f6eSSH\u96a7\u9053\u65f6\uff0c\u8bf7\u786e\u4fdd\u7aef\u53e3\u6ca1\u6709\u88ab\u5360\u7528\u3002<\/li>\n<li>\u8bbe\u7f6e\u4ee3\u7406\u65f6\uff0c\u8bf7\u786e\u4fdd\u4ee3\u7406\u670d\u52a1\u5668\u5730\u5740\u548c\u7aef\u53e3\u6b63\u786e\u3002<\/li>\n<\/ul>\n<p><h2>\u5b9e\u7528\u6280\u5de7<\/h2>\n<\/p>\n<ul>\n<li>\u4f7f\u7528SSH\u96a7\u9053\u65f6\uff0c\u53ef\u4ee5\u540c\u65f6\u8fde\u63a5\u591a\u4e2a\u7f51\u7ad9\uff0c\u63d0\u9ad8\u8bbf\u95ee\u901f\u5ea6\u3002<\/li>\n<li>\u5b9a\u671f\u66f4\u6362SSH\u96a7\u9053\u5bc6\u7801\uff0c\u786e\u4fdd\u8d26\u6237\u5b89\u5168\u3002<\/li>\n<li>\u4f7f\u7528SSH\u96a7\u9053\u65f6\uff0c\u6ce8\u610f\u89c2\u5bdf\u7f51\u7edc\u8fde\u63a5\u8d28\u91cf\uff0c\u907f\u514d\u9891\u7e41\u65ad\u5f00\u3002<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u6280\u672f\u7b80\u4ecb\u4e0e\u4efb\u52a1\u6982\u8ff0 \u5168\u7403\u4e0a\u7f51\u6280\u672f\u662f\u6307\u901a\u8fc7\u4e92\u8054\u7f51\u8fde\u63a5\u5168\u7403\u5404\u5730\u7684\u7528\u6237\uff0c\u5b9e\u73b0\u4fe1\u606f\u7684\u5168\u7403\u5171\u4eab\u548c\u4ea4\u6d41\u3002\u672c\u6587\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528SSH\u96a7\u9053\u6280\u672f\u5b9e\u73b0\u5168\u7403\u4e0a\u7f51\uff0c\u5305\u62ec\u64cd\u4f5c\u6b65\u9aa4\u3001\u547d\u4ee4\u793a\u4f8b\u53ca\u6ce8\u610f\u4e8b\u9879\u3002 \u64cd\u4f5c\u6b65\u9aa4 \u6b65\u9aa4\u4e00\uff1a\u9009\u62e9SSH\u96a7\u9053\u670d\u52a1 \u9996\u5148\uff0c\u60a8\u9700\u8981\u9009\u62e9\u4e00\u5bb6\u53ef\u9760&#8230;<\/p>\n","protected":false},"author":1,"featured_media":1624,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[530,142,529],"topic":[],"class_list":["post-1623","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-game-server","tag-putty","tag-ssh","tag-529"],"_links":{"self":[{"href":"https:\/\/www.vcidc.net\/blog\/wp-json\/wp\/v2\/posts\/1623","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.vcidc.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.vcidc.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.vcidc.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.vcidc.net\/blog\/wp-json\/wp\/v2\/comments?post=1623"}],"version-history":[{"count":1,"href":"https:\/\/www.vcidc.net\/blog\/wp-json\/wp\/v2\/posts\/1623\/revisions"}],"predecessor-version":[{"id":1626,"href":"https:\/\/www.vcidc.net\/blog\/wp-json\/wp\/v2\/posts\/1623\/revisions\/1626"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.vcidc.net\/blog\/wp-json\/wp\/v2\/media\/1624"}],"wp:attachment":[{"href":"https:\/\/www.vcidc.net\/blog\/wp-json\/wp\/v2\/media?parent=1623"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.vcidc.net\/blog\/wp-json\/wp\/v2\/categories?post=1623"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.vcidc.net\/blog\/wp-json\/wp\/v2\/tags?post=1623"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.vcidc.net\/blog\/wp-json\/wp\/v2\/topic?post=1623"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}