{"id":92619,"date":"2020-03-15T04:30:01","date_gmt":"2020-03-14T20:30:01","guid":{"rendered":"http:\/\/4563.org\/?p=92619"},"modified":"2020-03-15T04:30:01","modified_gmt":"2020-03-14T20:30:01","slug":"%e5%a6%82%e4%bd%95%e5%9c%a8%e5%90%8e%e5%8f%b0%e5%90%af%e5%8a%a8%e4%b8%80%e4%b8%aa-ssh-%e8%bf%9b%e7%a8%8b%ef%bc%8c%e5%85%b6%e4%bb%96%e8%bf%9b%e7%a8%8b%e5%8f%af%e4%bb%a5%e4%b8%8e%e8%bf%99%e4%b8%aa-ssh","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=92619","title":{"rendered":"\u5982\u4f55\u5728\u540e\u53f0\u542f\u52a8\u4e00\u4e2a ssh \u8fdb\u7a0b\uff0c\u5176\u4ed6\u8fdb\u7a0b\u53ef\u4ee5\u4e0e\u8fd9\u4e2a ssh \u8fdb\u7a0b\u4ea4\u4e92\u6267\u884c\u547d\u4ee4\u62ff\u5230\u8fd4\u56de\u503c\uff1f"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u5982\u4f55\u5728\u540e\u53f0\u542f\u52a8\u4e00\u4e2a ssh \u8fdb\u7a0b\uff0c\u5176\u4ed6\u8fdb\u7a0b\u53ef\u4ee5\u4e0e\u8fd9\u4e2a ssh \u8fdb\u7a0b\u4ea4\u4e92\u6267\u884c\u547d\u4ee4\u62ff\u5230\u8fd4\u56de\u503c\uff1f               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : phpfpm <\/span>  <span><i><\/i> 82<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>X problem\uff1a<\/p>\n<p>\u8fdc\u7a0b\u673a\u5668\u4e0a\u6709\u4e00\u4e9b\u6587\u4ef6\uff08 10~\u51e0\u767e KiB \uff09\uff0c\u4e0d\u5927\uff0c\u5982\u4f55\u9ad8\u6548\u5730\u83b7\u53d6\u8fd9\u4e9b\u6587\u4ef6 \/\u5e76\u4e14\u5728\u83b7\u53d6\u4e4b\u540e\u5220\u9664\u7b49\u64cd\u4f5c<\/p>\n<p>Y \u65b9\u6848\uff1a<\/p>\n<p>\u83b7\u53d6\u6587\u4ef6\uff1a<\/p>\n<pre><code>$ ssh server cat \/path\/to\/target <\/code><\/pre>\n<p>\u83b7\u53d6\u8fd4\u56de\u503c;\u6216\u8005\u7528 nginx \u901a\u8fc7 http \u62ff\u5230\u6587\u4ef6\uff1b \u5220\u9664\u6587\u4ef6\uff1a ssh \u8fdc\u7a0b\u6267\u884c\u5220\u9664<\/p>\n<p>\u95ee\u9898\uff1a \u6bcf\u6b21\u8fde\u63a5\u521d\u59cb\u5316\u7684\u65f6\u95f4\u8fc7\u957f\uff0c\u7531\u4e8e ssh \u662f\u901a\u8fc7\u4e00\u5c42\u96a7\u9053\uff08 frp \uff09\u53cd\u5411\u8fde\u56de\u6765\u7684\uff0c\u56e0\u6b64\u6bcf\u6b21\u83b7\u53d6\u7684 FTTB \u7565\u957f<\/p>\n<p>\u60f3\u95ee\u95ee\u6709\u6ca1\u6709\u4ec0\u4e48\u957f\u8fde\u63a5\u7684\u65b9\u5f0f\uff1f<\/p>\n<p>e.g.<\/p>\n<p>\u5982\u679c\u662f\u624b\u52a8\u7684\u8bdd\uff0c\u5f00\u542f\u4e00\u4e2a ssh \u8fdb\u7a0b\uff0c\u901a\u8fc7 copy-paste\/zmodem\/\u7ba1\u9053(?)\u7684\u65b9\u5f0f\uff0c\u628a\u6587\u4ef6\u62ff\u5230\u672c\u5730\uff0c\u4e4b\u540e\u5220\u6389\u6587\u4ef6\uff0c\u907f\u514d\u6bcf\u6b21\u5efa\u7acb\u8fde\u63a5\u7684\u5f00\u9500<\/p>\n<p>emm\uff0cso ssh \u80fd\u652f\u6301\u8fd9\u4e2a\u9700\u6c42\u5417\uff1f<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>12<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"957234\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ysc3839 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u7528 SCP \u534f\u8bae\u4e0d\u884c\u5417\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"957235\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : phpfpm <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @ysc3839 \u884c\uff0c\u4e3b\u8981\u662f\u6211\u662f\u8981\u5728\u4e00\u4e2a\u522b\u7684\u8fdb\u7a0b\u91cc\u9762\u62ff\u5230\u8fd9\u4e2a\u6587\u4ef6\uff0cssh cat \u76f4\u63a5\u5c31\u62ff\u5230\u5b57\u8282\u6d41\u4e86\uff0cscp \u8fd8\u5f97\u518d\u751f\u6210\u4e00\u4e2a\u4e34\u65f6\u6587\u4ef6\uff1b<\/p>\n<p>\u4f46\u662f\u95ee\u9898\u90fd\u662f\uff1a<\/p>\n<p>\u6211\u5355\u6b21\u90fd\u662f\u53ea\u83b7\u5f97\u4e00\u4e2a\u6587\u4ef6\uff0cscp \u4e5f\u662f\u4e00\u6b21\u4e00\u6587\u4ef6\uff0c\u6709\u8fde\u63a5\u5f00\u9500\u7684\u3002                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"957236\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ysc3839 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @phpfpm \u628a\u8981\u83b7\u53d6\u7684\u6240\u6709\u6587\u4ef6\u90fd\u7528 tar \u6253\u5305\uff0c\u7136\u540e ssh \u4f20\u8fc7\u6765\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"957237\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : phpfpm <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @ysc3839 \u6211\u8981\u53ca\u65f6\u6027\uff0cemm                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"957238\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Buges <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             libssh                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"957239\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : publicccc <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u53ef\u4ee5\u53c2\u8003\u4e0b sz \u548c rz \u7684\u5b9e\u73b0\uff0c<br \/>\u731c\u6d4b\u53ef\u80fd\u662f\u670d\u52a1\u7aef\u8f93\u51fa\u7279\u6b8a\u7684\u7f16\u7801\u4f7f\u5f97 ssh \u5ba2\u6237\u7aef\u8bc6\u522b\u5230\u662f\u5728\u53d1\u9001\u6587\u4ef6\u3002<\/p>\n<p>\u81ea\u5df1\u5b9e\u73b0\u7684\u8bdd\u65b9\u6848\u5e94\u8be5\u662f\u627e\u4e00\u4e2a ssh \u5e93\uff0c\u81ea\u5df1\u8bfb\u53d6\u8f93\u51fa\u8bc6\u522b\u7f16\u7801\u3002                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"957240\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : phpfpm <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @Buges \u613f\u95fb\u5176\u8be6\uff01<br \/>https:\/\/github.com\/degagne\/libssh2<br \/>@publicccc <\/p>\n<p>sz\/rz \u7528\u7684\u662f zmodem\uff0c\u8fd9\u73a9\u610f\u8c8c\u4f3c\u4e5f\u6bd4\u8f83\u53e4\u8001\u4e86\u3002\u3002                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"957241\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : guoshim <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u53ef\u4ee5\u7528\u7ba1\u9053\u6765\u63a7\u5236\u53e6\u4e00\u4e2a\u8fdb\u7a0b\uff0c\u5e76\u76d1\u6d4b\u53e6\u4e00\u4e2a\u8fdb\u7a0b\u7684 stdin\/stdout\/stderr\u3002Python \u91cc\u9762\u6709\u4e2a\u5305\u53eb pexpect\uff0c\u53ef\u4ee5\u641e\u8fd9\u4e2a\uff0c\u4e5f\u53ef\u4ee5\u81ea\u5df1\u624b\u64b8\u3002<\/p>\n<p>\u6216\u8005\u6309\u7167\u4e0a\u6240\u8bf4\uff0clibssh\u3002                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"957242\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : superrichman <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u7528 python \u7684 paramiko \u6a21\u5757\uff0c\u80fd\u6267\u884c shell \u547d\u4ee4\u4e5f\u53ef\u4ee5\u4e0b\u8f7d\u6587\u4ef6\uff0c\u5199\u4ee3\u7801\u5efa\u7acb\u8fde\u63a5\u4e00\u76f4\u4e0d\u5173\u5c31\u597d\u4e86                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"957243\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : phpfpm <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @guoshim \u4f18\u79c0\uff01\uff01<br \/>php \u4e0b\u9762\u4e0d\u77e5\u9053\u8fd9\u4e2a\u65b9\u6848\u662f\u4e0d\u662f\u597d work\uff0c\u6211\u5148\u7528 libssh2 \u4e86<\/p>\n<p>ubuntu19.04<\/p>\n<p>&#8220;`<br \/># apt install php-ssh2<br \/># php -i | grep ssh2<\/p>\n<p>$ composer require degagne\/libssh2<\/p>\n<p>&#8220;`<\/p>\n<p>\u9f50\u6d3b\uff01                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"957244\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : cy97cool <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u76f4\u63a5 sshfs \u628a\u8fdc\u7a0b\u670d\u52a1\u5668\u7684\u76ee\u5f55\u6302\u8f7d\u4e0d\u5c31\u5b8c\u4e8b\u4e86\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"957245\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : winglight2016 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @cy97cool \u8fd8\u6709\u8fd9\u79cd\u64cd\u4f5c\uff0c\u5b66\u4e60\u4e86\uff01                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u5982\u4f55\u5728\u540e\u53f0\u542f\u52a8\u4e00\u4e2a ssh \u8fdb\u7a0b\uff0c&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/92619"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=92619"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/92619\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=92619"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=92619"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=92619"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}