{"id":3908,"date":"2026-04-25T22:04:44","date_gmt":"2026-04-25T14:04:44","guid":{"rendered":"https:\/\/yowlab.idv.tw\/wordpress\/?p=3908"},"modified":"2026-04-25T22:11:01","modified_gmt":"2026-04-25T14:11:01","slug":"%e5%88%a9%e7%94%a8-ssh%e5%8f%8d%e5%90%91%e9%9a%a7%e9%81%93%e8%ae%93%e5%85%a9%e9%83%a8%e7%84%a1%e6%b3%95%e7%9b%b4%e6%8e%a5%e9%80%a3%e6%8e%a5%e4%b8%bb%e6%a9%9f%e5%81%9a%e8%b3%87%e6%96%99%e5%82%b3","status":"publish","type":"post","link":"https:\/\/yowlab.idv.tw\/wordpress\/?p=3908","title":{"rendered":"\u5229\u7528 ssh\u53cd\u5411\u96a7\u9053\u8b93\u5169\u90e8\u7121\u6cd5\u76f4\u63a5\u9023\u63a5\u4e3b\u6a5f\u505a\u8cc7\u6599\u50b3\u905e"},"content":{"rendered":"<p>\u56e0\u70ba\u67d0\u4e9b\u9700\u6c42\uff0c\u9700\u8981\u5c07\u8cc7\u6599\u5f9e A\u4e3b\u6a5f(192.168.100.101) \u642c\u5230 C\u4e3b\u6a5f(192.168.100.103)\u3002\u53e6\u5916\u9084\u6709\u4e00\u90e8 B\u4e3b\u6a5f((192.168.100.102)\u3002<\/p>\n<h4>\u76ee\u524d\u5be6\u969b\u72c0\u6cc1\uff1a<\/h4>\n<ol>\n<li>A\u4e3b\u6a5f\uff0cC\u4e3b\u6a5f \u4e0d\u80fd\u4e92\u901a\u3002<\/li>\n<li>B\u4e3b\u6a5f \u53ef\u4ee5\u900f\u904e ssh \u76f4\u63a5\u9023\u63a5 A\u4e3b\u6a5f\uff0cC\u4e3b\u6a5f\u3002<\/li>\n<li>A\u4e3b\u6a5f\uff0cC\u4e3b\u6a5f \u4e0d\u80fd\u76f4\u63a5\u9023\u63a5 B\u4e3b\u6a5f\u3002<\/li>\n<\/ol>\n<p><a href=\"https:\/\/yowlab.idv.tw\/wordpress\/wp-content\/uploads\/2026\/04\/1.png\"><img decoding=\"async\" src=\"https:\/\/yowlab.idv.tw\/wordpress\/wp-content\/uploads\/2026\/04\/1.png\" alt=\"\" \/><\/a><\/p>\n<style type=\"text\/css\">\nli.present01 {line-height:2em; background-color:#F5E5C9; padding:5px; border-radius:10px; font-weight:bold; margin:5px;}\nli.present02 {line-height:2em; background-color:#ceffbc; padding:5px; border-radius:10px; font-weight:bold; margin:5px;}\nli.present03 {line-height:1.5em; background-color:#b3dffa; padding:5px; border-radius:10px; font-weight:bold; margin:5px;}\nul.none {list-style-type:none;line-height:1.5em; padding:10px;}\nol.lower-alpha {list-style-type:lower-alpha;}\nol.lower-roman {list-style-type:lower-roman;}\nul.note {line-height:1.5em; padding:2px; font-weight:bold; font-size:0.9em;}\n.highlight01 {font-weight:bold; line-height:1.5em; background-color:#e7f49c; padding:0px 2px; border:1px; border-radius:10px;}\n.highlight02 {font-weight:bold; line-height:1.5em; background-color:#F2F26B; padding:1px 1px; border:1px;}\n.highlight03 {font-weight:bold; line-height:1.5em; background-color:#F9BF72; padding:3px 10px; border:2px; border-radius:10px;}\n.highlight04 {font-weight:bold; line-height:1.5em; background-color:#F9BF72; padding:3px 10px 0px 10px; border:0px; border-radius:3px;}\n.box01 {margin: 5px; border:1px #19130B solid; border-radius:5px; padding:10px;}\n.box02 {margin: 5px; font-weight:bold; line-height:1.5em; padding:10px; border:1px #19130B solid; border-radius:5px; float: left;}\nh3 {border:2px #000 solid; border-width:0px 0px 1px 0px; padding-width:0px 0px 3px 0px;}\nh4 {border:2px #000 solid; border-width:0px 0px 1px 0px; padding-width:0px 0px 3px 0px;}\npre { margin: 0px; padding:0px 5px; border:2px soild #000; }<\/p>\n<\/style>\n<h4>\u89e3\u6c7a\u60f3\u6cd5\uff1a<\/h4>\n<ol>\n<li>B\u4e3b\u6a5f\u900f\u904e ssh \u9023\u63a5A\u4e3b\u6a5f\uff0cC\u4e3b\u6a5f\uff0c\u4e26\u5206\u5225\u5efa\u7acb\u53cd\u5411\u96a7\u9053\u3002<\/li>\n<li>A\u4e3b\u6a5f\uff0cC\u4e3b\u6a5f \u5229\u7528\u53cd\u5411\u96a7\u9053\uff0c\u900f\u904e B\u4e3b\u6a5f\u50b3\u905e\u8cc7\u6599\u3002<\/li>\n<\/ol>\n<ol>\n<li class=\"present01\">\u5efa\u7acb A\u4e3b\u6a5f, C\u4e3b\u6a5f \u8207 B\u4e3b\u6a5f\u7684\u53cd\u5411\u96a7\u9053<\/li>\n<h5 class=\"highlight01\">\u5efa\u7acb\u53cd\u5411\u96a7\u9053\uff1a<\/h5>\n<pre data-enlighter-language=\"xml\" class=\"EnlighterJSRAW\">\r\n\r\n     B(192.168.100.102)--&gt;A(192.168.100.101) : \r\n         ssh -NfR 4000:localhost:22 user@A\u4e3b\u6a5f(192.168.100.101)\r\n\r\n     B(192.168.100.102)--&gt;C(192.168.100.103) : \r\n         ssh -NfR 4000:localhost:22 user@C\u4e3b\u6a5f(192.168.100.103) \r\n\r\n    <\/pre>\n<p>&nbsp;<\/p>\n<h5 class=\"highlight01\">A, C \u9023\u56de B\u4e3b\u6a5f\uff1a<\/h5>\n<pre data-enlighter-language=\"xml\" class=\"EnlighterJSRAW\">\r\n\r\n     A(192.168.100.101)--&gt;B(192.168.100.102) : \r\n         ssh user@localhost -P 4000\r\n\r\n     C(192.168.100.103)--&gt;B(192.168.100.102) : \r\n          ssh user@localhost -P 4000\r\n\r\n    <\/pre>\n<p>&nbsp;<\/p>\n<li class=\"present01\">\u50b3\u905e\u8cc7\u6599<\/li>\n<h5 class=\"highlight01\">\u4f7f\u7528scp\uff0c\u8cc7\u6599\u5f9e A\u4e3b\u6a5f &#8211;> C\u4e3b\u6a5f<\/h5>\n<pre data-enlighter-language=\"xml\" class=\"EnlighterJSRAW\">\r\n\r\n      \u5148\u767b\u5165\u5230 A\u4e3b\u6a5f\u4e0a\uff0c\u518d\uff1a\r\n      scp -J user@localhost:4000  A\u4e3b\u6a5f\/\u672c\u5730\u6a94\u6848\u8def\u5f91  user@C\u4e3b\u6a5f(192.168.100.103):\/\u76ee\u7684\u5730\u8def\u5f91\/\r\n\r\n    <\/pre>\n<p>&nbsp;<\/p>\n<h5 class=\"highlight01\">\u82e5\u662f\u5927\u6a94\u6848\uff0c\u6216\u662f\u5927\u6279\u6a94\u6848\uff0c\u5efa\u8b70\u4f7f\u7528 rsync<\/h5>\n<pre data-enlighter-language=\"xml\" class=\"EnlighterJSRAW\">\r\n\r\n      \u5148\u767b\u5165\u5230 A\u4e3b\u6a5f\u4e0a\uff0c\u518d\uff1a\r\n      rsync -avz -e &#039;ssh -J user@localhost:4000&#039; A\u4e3b\u6a5f\/\u672c\u5730\u6a94\u6848\u8def\u5f91  user@C\u4e3b\u6a5f(192.168.100.103):\/\u76ee\u7684\u5730\u8def\u5f91\/\r\n\r\n    <\/pre>\n<p>&nbsp;<\/p>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>\u56e0\u70ba\u67d0\u4e9b\u9700\u6c42\uff0c\u9700\u8981\u5c07\u8cc7\u6599\u5f9e A\u4e3b\u6a5f(192.168.100.101) \u642c\u5230 C\u4e3b\u6a5f <a class=\"more-link\" href=\"https:\/\/yowlab.idv.tw\/wordpress\/?p=3908\">Continue reading <span class=\"screen-reader-text\">  \u5229\u7528 ssh\u53cd\u5411\u96a7\u9053\u8b93\u5169\u90e8\u7121\u6cd5\u76f4\u63a5\u9023\u63a5\u4e3b\u6a5f\u505a\u8cc7\u6599\u50b3\u905e<\/span><span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[54],"class_list":["post-3908","post","type-post","status-publish","format-standard","hentry","category-3","tag-ssh"],"_links":{"self":[{"href":"https:\/\/yowlab.idv.tw\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/3908","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/yowlab.idv.tw\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/yowlab.idv.tw\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/yowlab.idv.tw\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/yowlab.idv.tw\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3908"}],"version-history":[{"count":17,"href":"https:\/\/yowlab.idv.tw\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/3908\/revisions"}],"predecessor-version":[{"id":3926,"href":"https:\/\/yowlab.idv.tw\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/3908\/revisions\/3926"}],"wp:attachment":[{"href":"https:\/\/yowlab.idv.tw\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3908"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/yowlab.idv.tw\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3908"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/yowlab.idv.tw\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3908"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}