{"id":185,"date":"2022-06-01T23:57:30","date_gmt":"2022-06-01T14:57:30","guid":{"rendered":"https:\/\/www.b64.pw\/blog\/?p=185"},"modified":"2022-06-02T00:03:10","modified_gmt":"2022-06-01T15:03:10","slug":"allowtcpforward%e3%81%8coff%e3%81%ae%e7%92%b0%e5%a2%83%e3%81%a7%e3%82%82rsync%e3%81%a7%e3%81%8d%e3%82%8b%e3%82%88%e3%81%86%e3%81%ab%e3%81%99%e3%82%8b","status":"publish","type":"post","link":"https:\/\/www.b64.pw\/blog\/?p=185","title":{"rendered":"sshd\u306econfig\u304cAllowTCPForward\u304coff\u306e\u74b0\u5883\u3067\u3082rsync\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b"},"content":{"rendered":"\n<p><a href=\"https:\/\/www.b64.pw\/blog\/?p=171\">\u524d\u56de\u66f8\u3044\u305f<\/a>RemoteCommand\u306e\u8a2d\u5b9a\u3060\u3068\u3053\u306e\u3088\u3046\u306a\u30a8\u30e9\u30fc\u304c\u51fa\u3066<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Cannot execute command-line and remote command.<\/code><\/pre>\n\n\n\n<p>\u305d\u306e\u307e\u307e\u3067\u306frsync\u304c\u3067\u304d\u306a\u3044\u3053\u3068\u304c\u308f\u304b\u308a\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p>\u5bfe\u51e6\u65b9\u6cd5\u306f\u3053\u308c\u307e\u305f\u4e8c\u3064\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p><strong>\u5bfe\u51e61<\/strong><\/p>\n\n\n\n<p>RemoteCommand\u3067\u4f55\u3068\u304b\u52d5\u304b\u305d\u3046\u3068\u3059\u308b\u5834\u5408 ssh -o RemoteCommand=none \u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u3064\u3051\u308b\u3053\u3068\u3067\u56de\u907f\u3067\u304d\u308b\u3002<br>\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u3067\u4e0b\u8a18\u306e\u3088\u3046\u306b\u6307\u5b9a\u3059\u308b<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>rsync -e 'ssh -o RemoteCommand=none' src host_sv:dest<\/code><\/pre>\n\n\n\n<p><strong>\u5bfe\u51e62<\/strong><\/p>\n\n\n\n<p>.ssh\/config\u306eProxyCommand\u3092nc\u3067\u6e21\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Host step_sv\n  User loginuser\n  Hostname step_sv.example.com\n\nHost target_sv\n#  ProxyCommand -W %h:%p step_sv\n  ProxyCommand ssh step_sv nc %h %p<\/code><\/pre>\n\n\n\n<p><strong>\u53c2\u8003<\/strong><\/p>\n\n\n\n<p>How to bypass RemoteCommand option in ssh_config<br><a href=\"https:\/\/unix.stackexchange.com\/questions\/628607\/how-to-bypass-remotecommand-option-in-ssh-config\">https:\/\/unix.stackexchange.com\/questions\/628607\/how-to-bypass-remotecommand-option-in-ssh-config<\/a><\/p>\n\n\n\n<p>\u8e0f\u307f\u53f0\u30b5\u30fc\u30d0\u3092\u7d4c\u7531\u3057\u3066\u697d\u3057\u3066ssh\u3057\u305f\u3044\u3000ProxyCommand\u3068netcat\u3092\u4f7f\u3046<br><a href=\"http:\/\/blog.livedoor.jp\/ashibuya0128\/archives\/52073378.html\">http:\/\/blog.livedoor.jp\/ashibuya0128\/archives\/52073378.html<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u56de\u66f8\u3044\u305fRemoteCommand\u306e\u8a2d\u5b9a\u3060\u3068\u3053\u306e\u3088\u3046\u306a\u30a8\u30e9 &#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[7],"tags":[],"_links":{"self":[{"href":"https:\/\/www.b64.pw\/blog\/index.php?rest_route=\/wp\/v2\/posts\/185"}],"collection":[{"href":"https:\/\/www.b64.pw\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.b64.pw\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.b64.pw\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.b64.pw\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=185"}],"version-history":[{"count":4,"href":"https:\/\/www.b64.pw\/blog\/index.php?rest_route=\/wp\/v2\/posts\/185\/revisions"}],"predecessor-version":[{"id":190,"href":"https:\/\/www.b64.pw\/blog\/index.php?rest_route=\/wp\/v2\/posts\/185\/revisions\/190"}],"wp:attachment":[{"href":"https:\/\/www.b64.pw\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=185"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.b64.pw\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=185"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.b64.pw\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=185"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}