{"id":204457,"date":"2012-01-01T21:13:22","date_gmt":"2012-01-02T04:13:22","guid":{"rendered":"http:\/\/chinadigitaltimes.net\/chinese\/2012\/01\/%e7%bf%bb%e5%a2%99-ssh-via-http-proxy\/"},"modified":"2012-01-01T21:13:22","modified_gmt":"2012-01-02T04:13:22","slug":"%e7%bf%bb%e5%a2%99-ssh-via-http-proxy","status":"publish","type":"post","link":"https:\/\/chinadigitaltimes.net\/chinese\/204457.html","title":{"rendered":"\u7ffb\u5899 | SSH via HTTP Proxy"},"content":{"rendered":"<p>\u539f\u6587\uff1a<a rel=\"nofollow noopener\" target=\"_blank\" href=\"http:\/\/terrywang.net\/archives\/1321\">http:\/\/terrywang.net\/archives\/1321<\/a><\/p>\n<p>\u8fd9\u662f\u4e00\u4e2a\u56f0\u6270\u6211\u8bb8\u4e45\u7684\u95ee\u9898\uff0c\u56e0\u4e3a\u81ea\u5df1\u6bd4\u8f83\u61d2\u6240\u4ee5\u4e00\u76f4\u6ca1\u6709\u53bb\u5c31\u5bfb\u6839\u95ee\u5e95\uff0c\u9700\u8981\u7528\u5230 SSH Tunnel \u65f6\u5c31\u7528 PuTTY \u6765\u7ed5\u8fc7\u8fd9\u4e2a\u95ee\u9898\u3002<\/p>\n<p>\u95ee \u9898\u7684\u4ea7\u751f\uff1a\u516c\u53f8\u7684\u7f51\u7edc\u73af\u5883\u9700\u8981\u8d70 HTTP Proxy \u624d\u80fd\u8bbf\u95ee\u5916\u90e8 Internet\u3002\u5de5\u4f5c\u673a\u7528 Ubuntu \uff0c\u65e0\u8bba\u662f\u5728 Terminal  \u4e2d\u624b\u52a8\u8bbe\u7f6e http_proxy \u8fd8\u662f\u7528 gnome-network-properties GUI \u8bbe\u7f6e\u5168\u5c40\u73af\u5883\u53d8\u91cf\uff0c\u5bf9\u5728\u547d\u4ee4\u884c\u4e2d\u7528 ssh  \u90fd\u4e0d\u8d77\u4f5c\u7528\u3002<\/p>\n<p>\u89e3\u51b3\u65b9\u6cd5\uff1a Debian\/Ubuntu \u4e0b\u53ef\u4ee5\u5b89\u88c5 connect-proxy \u5305\uff0c\u4ee5\u4e0b\u662f\u5305\u63cf\u8ff0\uff1a<\/p>\n<p>Description: Establish TCP connection using SOCKS4\/5 or HTTP tunnel<br \/>connect-proxy is a simple relaying command to make tunnel TCP connection<br \/> via SOCKS or HTTPS proxies.<br \/>It is mainly intended to be used as proxy command of OpenSSH.<\/p>\n<p>\u5b89\u88c5\u540e\u7f16\u8f91\u4e00\u4e0b ~\/.ssh\/config \u4f8b\u5982\uff1a<\/p>\n<p>## Servers outside the firewall, use HTTP proxy<br \/>Host <a rel=\"nofollow noopener\" target=\"_blank\" href=\"http:\/\/my-ssh-server.com\">my-ssh-server.com<\/a><br \/> ProxyCommand connect -H <a rel=\"nofollow noopener\" target=\"_blank\" href=\"http:\/\/proxy.my-ssh-server.com:80\">proxy.my-ssh-server.com:80<\/a> %h %p<br \/>## Sites inside the firewall, do NOT use proxy<br \/>Host *<br \/>ProxyCommand connect %h %p<\/p>\n<p>\u4fdd\u5b58\uff0c\u518d\u8bd5\u4e00\u4e0bssh \u5230\u6211\u7684ssh server\u641e\u5b9a\uff01<\/p>\n<p>\u66f4\u591a connect-proxy \u7684\u7528\u6cd5\u8bf7 RTFM \u54c8\u3002<\/p>\n<p>\u6ce8\u610f\uff1a\u8fd9\u6837\u7684\u8bdd\u4e5f\u5e26\u6765\u4e86\u53e6\u5916\u4e00\u4e2a\u95ee\u9898\uff0c\u82e5\u5207\u6362\u5230\u5bb6\u4e2d\u6216\u5176\u5b83\u4e0d\u9700\u8981\u4ee3\u7406\u7684\u73af\u5883\uff0c\u5c31\u4f1a\u51fa\u73b0\u8fde\u4e0d\u4e0a\u6211\u7684ssh server \u7684\u60c5\u51b5\u3002\u81f3\u4e8e\u5982\u4f55\u89e3\u51b3\uff0c\u5927\u5bb6\u81ea\u884c\u52a8\u8111\u7b4b\u5427;-)<br \/>\u8fd8\u662f\u90a3\u53e5\u8bdd\uff1a\u4e16\u4e0a\u65e0\u96be\u4e8b\uff0c\u53ea\u6015\u6709\u5fc3\u4eba\u3002<\/p>\n<p> <\/p>\n<div>\u7ffb\u8d8a\u9632\u706b\u957f\u57ce\uff0c\u4f60\u53ef\u4ee5\u5230\u8fbe\u4e16\u754c\u4e0a\u7684\u6bcf\u4e00\u4e2a\u89d2\u843d\u3002\uff08Across the Great Firewall, you can reach every corner in the world.\uff09\u7ffb\u5899\u5229\u5668\u8d5b\u98ce3\u4e0b\u8f7d\u5730\u5740\uff1a<a rel=\"nofollow noopener\" target=\"_blank\" href=\"http:\/\/dld.bz\/caonima326\"> http:\/\/dld.bz\/caonima326<\/p>\n<p><\/a>\uff0c<a rel=\"nofollow noopener\" target=\"_blank\" href=\"http:\/\/dld.bz\/caonima745\">http:\/\/dld.bz\/caonima745<\/a><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"1\" src=\"https:\/\/blogger.googleusercontent.com\/tracker\/5500297126185736776-8497306537833511091?l=www.chinagfw.org\" width=\"1\" \/><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" height=\"1\" src=\"http:\/\/feeds.feedburner.com\/~r\/ChinaGfw\/~4\/DGBMsQ6wwcA\" width=\"1\" \/><\/p>\n<p><small>\u672c\u6587\u7531\u81ea\u52a8\u805a\u5408\u7a0b\u5e8f\u53d6\u81ea\u7f51\u7edc\uff0c\u5185\u5bb9\u548c\u89c2\u70b9\u4e0d\u4ee3\u8868\u6570\u5b57\u65f6\u4ee3\u7acb\u573a<\/small><\/p>\n<p><iframe loading=\"lazy\" src=\"https:\/\/docs.google.com\/spreadsheet\/embeddedform?formkey=dGRpN3FrVThuMFFsZHBZcmNGLW94dEE6MQ\" width=\"450\" height=\"309\" frameborder=\"0\" marginheight=\"0\" marginwidth=\"0\">Loading&#8230;<\/iframe><\/p>\n<form method=\"POST\" action=\"http:\/\/www.feedblitz.com\/f\/f.fbz?AddNewUserDirect\">\n\u5b9a\u671f\u83b7\u5f97\u7ffb\u5899\u4fe1\u606f\uff1f<a href=\"http:\/\/www.feedblitz.com\/f\/?Sub=738338\" target=\"_blank\" rel=\"noopener\">\u8bf7\u7535\u90ae\u8ba2\u9605\u6570\u5b57\u65f6\u4ee3<\/a> <br \/><input name=\"EMAIL\" maxlength=\"64\" type=\"text\" size=\"25\" value=\"\"><br \/>\n<input name=\"FEEDID\" type=\"hidden\" value=\"738338\"><br \/>\n<input name=\"PUBLISHER\" type=\"hidden\" value=\"7485568\"><br \/>\n<input type=\"submit\" value=\"\u8ba2\u9605!\"><br \/>\n<\/form>\n","protected":false},"excerpt":{"rendered":"<p>\u539f\u6587\uff1a http:\/\/terrywang.net\/archives\/1321 \u8fd9\u662f\u4e00\u4e2a\u56f0\u6270\u6211\u8bb8\u4e45\u7684\u95ee\u9898\uff0c\u56e0\u4e3a\u81ea\u5df1\u6bd4\u8f83\u61d2\u6240\u4ee5\u4e00\u76f4\u6ca1\u6709\u53bb\u5c31\u5bfb\u6839\u95ee\u5e95\uff0c\u9700\u8981\u7528\u5230 SSH Tunnel \u65f6\u5c31\u7528 PuTTY \u6765\u7ed5\u8fc7\u8fd9\u4e2a\u95ee\u9898\u3002 \u95ee \u9898\u7684\u4ea7\u751f\uff1a\u516c\u53f8\u7684\u7f51\u7edc\u73af\u5883\u9700\u8981\u8d70 HTTP Proxy \u624d\u80fd\u8bbf\u95ee\u5916\u90e8 Internet\u3002\u5de5\u4f5c\u673a\u7528 Ubuntu \uff0c\u65e0\u8bba\u662f\u5728 Terminal \u4e2d\u624b\u52a8\u8bbe\u7f6e http_proxy \u8fd8\u662f\u7528 gnome-network-properties GUI \u8bbe\u7f6e\u5168\u5c40\u73af\u5883\u53d8\u91cf\uff0c\u5bf9\u5728\u547d\u4ee4\u884c\u4e2d\u7528 ssh \u90fd\u4e0d\u8d77\u4f5c\u7528\u3002 \u89e3\u51b3\u65b9\u6cd5\uff1a Debian\/Ubuntu \u4e0b\u53ef\u4ee5\u5b89\u88c5 connect-proxy \u5305\uff0c\u4ee5\u4e0b\u662f\u5305\u63cf\u8ff0\uff1a Description: Establish TCP connection using SOCKS4\/5 or HTTP tunnel connect-proxy is a simple relaying command to make tunnel TCP connection via SOCKS or HTTPS proxies. It is mainly intended to be used as proxy command of OpenSSH. \u5b89\u88c5\u540e\u7f16\u8f91\u4e00\u4e0b ~\/.ssh\/config \u4f8b\u5982\uff1a ## Servers outside the firewall, use HTTP proxy Host my-ssh-server.com ProxyCommand connect -H proxy.my-ssh-server.com:80 %h %p ## Sites inside the firewall, do NOT use proxy Host * ProxyCommand connect %h %p \u4fdd\u5b58\uff0c\u518d\u8bd5\u4e00\u4e0bssh \u5230\u6211\u7684ssh server\u641e\u5b9a\uff01 \u66f4\u591a connect-proxy \u7684\u7528\u6cd5\u8bf7 RTFM \u54c8\u3002 \u6ce8\u610f\uff1a\u8fd9\u6837\u7684\u8bdd\u4e5f\u5e26\u6765\u4e86\u53e6\u5916\u4e00\u4e2a\u95ee\u9898\uff0c\u82e5\u5207\u6362\u5230\u5bb6\u4e2d\u6216\u5176\u5b83\u4e0d\u9700\u8981\u4ee3\u7406\u7684\u73af\u5883\uff0c\u5c31\u4f1a\u51fa\u73b0\u8fde\u4e0d\u4e0a\u6211\u7684ssh server \u7684\u60c5\u51b5\u3002\u81f3\u4e8e\u5982\u4f55\u89e3\u51b3\uff0c\u5927\u5bb6\u81ea\u884c\u52a8\u8111\u7b4b\u5427;-) \u8fd8\u662f\u90a3\u53e5\u8bdd\uff1a\u4e16\u4e0a\u65e0\u96be\u4e8b\uff0c\u53ea\u6015\u6709\u5fc3\u4eba\u3002 \u7ffb\u8d8a\u9632\u706b\u957f\u57ce\uff0c\u4f60\u53ef\u4ee5\u5230\u8fbe\u4e16\u754c\u4e0a\u7684\u6bcf\u4e00\u4e2a\u89d2\u843d\u3002\uff08Across the Great Firewall, you can reach every corner in the world.\uff09\u7ffb\u5899\u5229\u5668\u8d5b\u98ce3\u4e0b\u8f7d\u5730\u5740\uff1a http:\/\/dld.bz\/caonima326 \uff0c http:\/\/dld.bz\/caonima745 <\/p>\n","protected":false},"author":1005,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","ampforwp-amp-on-off":"","home_featured":"","footnotes":"","_links_to":"","_links_to_target":""},"categories":[15300],"tags":[8795,8800,8817],"class_list":["post-204457","post","type-post","status-publish","format-standard","hentry","category-15300","tag-8795","tag-8800","tag-8817","et-doesnt-have-format-content","et_post_format-et-post-format-standard"],"_links":{"self":[{"href":"https:\/\/chinadigitaltimes.net\/chinese\/wp-json\/wp\/v2\/posts\/204457","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/chinadigitaltimes.net\/chinese\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/chinadigitaltimes.net\/chinese\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/chinadigitaltimes.net\/chinese\/wp-json\/wp\/v2\/users\/1005"}],"replies":[{"embeddable":true,"href":"https:\/\/chinadigitaltimes.net\/chinese\/wp-json\/wp\/v2\/comments?post=204457"}],"version-history":[{"count":0,"href":"https:\/\/chinadigitaltimes.net\/chinese\/wp-json\/wp\/v2\/posts\/204457\/revisions"}],"wp:attachment":[{"href":"https:\/\/chinadigitaltimes.net\/chinese\/wp-json\/wp\/v2\/media?parent=204457"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/chinadigitaltimes.net\/chinese\/wp-json\/wp\/v2\/categories?post=204457"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/chinadigitaltimes.net\/chinese\/wp-json\/wp\/v2\/tags?post=204457"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}