{"id":1472,"date":"2013-01-02T04:13:42","date_gmt":"2013-01-01T19:13:42","guid":{"rendered":"http:\/\/daily.belltail.jp\/?p=1472"},"modified":"2013-01-02T04:28:25","modified_gmt":"2013-01-01T19:28:25","slug":"ssh%e3%83%97%e3%83%ad%e3%82%ad%e3%82%b7%e8%a8%ad%e5%ae%9a","status":"publish","type":"post","link":"https:\/\/daily.belltail.jp\/?p=1472","title":{"rendered":"ssh\u30d7\u30ed\u30ad\u30b7\u8a2d\u5b9a"},"content":{"rendered":"<p>\u3042\u3051\u307e\u3057\u3066\u304a\u3081\u3067\u3068\u3046\u3054\u3056\u3044\u307e\u3059\uff0e<br \/>\n\u86c7\u5e74\u3067\u3059\u306d\uff0e\u5e74\u7537\u3067\u3059\u304c\uff0c\u4eca\u5e74\u3082\u9b5a\u3067\u3084\u3063\u3066\u3044\u304d\u307e\u3059\uff0e<\/p>\n<p>\u3055\u3066\uff0c\u30e9\u30dc\u306eLAN\u5185\u306e\u81ea\u5206\u306e\u30de\u30b7\u30f3\u306b\u5b66\u5916\u304b\u3089ssh\u3067\u5165\u308a\u305f\u3044\u3067\u3059\uff0e<br \/>\n\u305d\u306e\u305f\u3081\u306b\u306f\uff0c\u30e9\u30dc\u306e\u30b2\u30fc\u30c8\u30a6\u30a7\u30a4\u3092\u8d85\u3048\u308b\u5fc5\u8981\u304c\u3042\u3063\u3066\uff0c\u591a\u6bb5SSH\u3092\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\uff0e<\/p>\n<p>\u5bb6PC\u304b\u3089\uff0c\u30e9\u30dcGW\u306bssh\u3057\u3066\uff0c\u305d\u3053\u304b\u3089\u30e9\u30dcPC\u306bssh\uff0c\u3053\u308c\u3092\uff0cSSH\u30d7\u30ed\u30ad\u30b7\u6a5f\u80fd\u3067\u4e00\u5ea6\u306b\u3084\u3063\u3066\u304f\u308c\u308b\u8a2d\u5b9a\uff0e<br \/>\n\u3044\u308f\u3086\u308bport forwarding\u3067\u306f\u306a\u304f\u3066\uff0cnc\u3068\u304b\u3082\u4e0d\u8981\u3067\u539f\u7406\u3082\u308f\u304b\u308a\u3084\u3059\u304f\u8a2d\u5b9a\u3082\u30e9\u30af\u3067\u3059\uff0e<\/p>\n<p>\u57fa\u672c\u7684\u306b\u306f\u3053\u306e\u3042\u305f\u308a\u3092\u53c2\u8003\u306b\u3057\u3066\u308b\u3068\u3044\u3046\u304b\u305d\u306e\u307e\u307e\u3067\u3059\uff0e<br \/>\n[http:\/\/blog.takuo.jp\/2012\/03\/how-to-multihopped-ssh-login.html:title=The Weight @northeye: ssh\u30b3\u30de\u30f3\u30c9\u3060\u3051\u3067\u591a\u6bb5\u30ed\u30b0\u30a4\u30f3\u3059\u308b]<br \/>\n\u3042\u3068\u3053\u306e\u3084\u308a\u65b9\u306e\u624b\u304c\u304b\u308a\uff1f\u306f[https:\/\/twitter.com\/ton1517:title=@ton1517]\u304c\u6559\u3048\u3066\u304f\u308c\u307e\u3057\u305f\uff0e\uff54\uff48\uff58\uff01<\/p>\n<p>\u5bb6PC\uff0c\u30e9\u30dcGW\uff0c\u30e9\u30dcPC\u3069\u308c\u3082Linux\u3067\u3059\uff0e<\/p>\n<p><strong>\u5bb6PC<\/strong>\u306e\u81ea\u5206\u306essh\u8a2d\u5b9a\u3092\u8a18\u8ff0\u3057\u307e\u3059\uff0e$HOME\/.ssh\/config\u3092\u7de8\u96c6\u3057\u3066\u304f\u3060\u3055\u3044\uff0e<br \/>\n-\u5bb6PC\u30db\u30b9\u30c8\u540d: HOMEPC<br \/>\n-\u30e9\u30dcGW\u30db\u30b9\u30c8\u540d: LABGW (\u5916\u304b\u3089\u666e\u901a\u306bssh\u3067\u304d\u308b\u5b8c\u5168\u306a\u540d\u524d\u3067)<br \/>\n-\u30e9\u30dcPC\u30db\u30b9\u30c8\u540d: LABPC<br \/>\n-\u30e9\u30dcPC\u306b\u5165\u308b\u3068\u304d\u306e\u30e6\u30fc\u30b6\u540d: labgw_name<br \/>\n-\u30e9\u30dcGW\u306b\u5165\u308b\u3068\u304d\u306e\u30e6\u30fc\u30b6\u540d: labpc_name<br \/>\n\u3068\u3057\u3066\uff0c<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n% cat ~\/.ssh\/config\r\nHost LABPC\r\n    Hostname        LABPC\r\n    User            labpc_name\r\n    ProxyCommand    ssh labgw_name@LABGW -W %h:%p\r\n<\/pre>\n<p>\u30db\u30b9\u30c8\u540d\u306fIP\u30a2\u30c9\u30ec\u30b9\u3067\u3082\u304a\uff4b\u3067\u3059\uff0e<\/p>\n<p>\u4f55\u6bb5\u968e\u304b\u306eGW\u3092\u7d4c\u308b\u5fc5\u8981\u304c\u3042\u308b\u5834\u5408\u306fHost\u306e\u30db\u30b9\u30c8\u540d\u3084\u30d7\u30ed\u30ad\u30b7\u5148\u3092\u5909\u3048\u306a\u304c\u3089\u7d4c\u7531\u3059\u308bGW\u306e\u5206\u3060\u3051\u7dda\u5f62\u30ea\u30b9\u30c8\u306e\u3088\u3046\u306b\u66f8\u304d\u8db3\u3057\u3066\u884c\u3051\u308b\u3088\u3046\u3067\u3059\uff0e<\/p>\n<p>\u3053\u308c\u3067\uff0c\u5bb6PC\u306b\u3066<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nHOMEPC% ssh LABPC\r\n<\/pre>\n<p>\u3067\u30e9\u30dcPC\u306b\u4e00\u6c17\u306b\u3064\u306a\u304c\u308a\u307e\u3059\uff0e\u30e6\u30fc\u30b6\u540d\u4fee\u98fe\u3082\u4e0d\u8981\u3067(\uff9f\u0434\uff9f)\uff73\uff8f\uff70\u3067\u3059\uff0e<br \/>\n\u307e\u305f\uff0c<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nHOMEPC% ssh -XY LABPC\r\n<\/pre>\n<p>\u3068\u3057\u3066X\u306e\u8ee2\u9001\u3082\u3067\u304d\u3066\u8d85(\uff9f\u0434\uff9f)\uff73\uff8f\uff70\u3067\u3059\uff0e<\/p>\n<p>\u4ee5\u4e0a\uff0c2013\u5e74\u6700\u521d\u306e\u8a18\u4e8b\u306f\u5b8c\u5168\u306b\u81ea\u5206\u7528\u30e1\u30e2\u3067\u3057\u305f\uff0e<\/p>\n<p>\u79c1\u4e8b\u3067\u3059\u304c\uff0c\u3053\u3046\u3057\u3066\u30e9\u30dc\u5916\u304b\u3089\u3067\u3082\u81ea\u7531\u306b\u7814\u7a76\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u306a\u3044\u3068\u30e4\u30d0\u3044\u72b6\u6cc1\u3067\u3059\uff0e\u306a\u3093\u3068\u3044\u3046\u5e74\u660e\u3051\uff0e<br \/>\n\u7814\u7a76\u3068\u3044\u3046\u540d\u306e\u30a8\u30af\u30b9\u30c8\u30ea\u30fc\u30e0\u30b9\u30dd\u30fc\u30c4\uff0e<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3042\u3051\u307e\u3057\u3066\u304a\u3081\u3067\u3068\u3046\u3054\u3056\u3044\u307e\u3059\uff0e \u86c7\u5e74\u3067\u3059\u306d\uff0e\u5e74\u7537\u3067\u3059\u304c\uff0c\u4eca\u5e74\u3082\u9b5a\u3067\u3084\u3063\u3066\u3044\u304d\u307e\u3059\uff0e \u3055\u3066\uff0c\u30e9\u30dc\u306eLAN\u5185\u306e\u81ea\u5206\u306e\u30de\u30b7\u30f3\u306b\u5b66\u5916\u304b\u3089ssh\u3067\u5165\u308a\u305f\u3044\u3067\u3059\uff0e \u305d\u306e\u305f\u3081\u306b\u306f\uff0c\u30e9\u30dc\u306e\u30b2\u30fc\u30c8\u30a6\u30a7\u30a4\u3092\u8d85\u3048\u308b\u5fc5\u8981\u304c\u3042\u3063\u3066\uff0c\u591a\u6bb5SSH\u3092 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[7,38,10],"class_list":["post-1472","post","type-post","status-publish","format-standard","hentry","category-1","tag-linux","tag-38","tag-10"],"_links":{"self":[{"href":"https:\/\/daily.belltail.jp\/index.php?rest_route=\/wp\/v2\/posts\/1472","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/daily.belltail.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/daily.belltail.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/daily.belltail.jp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/daily.belltail.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1472"}],"version-history":[{"count":0,"href":"https:\/\/daily.belltail.jp\/index.php?rest_route=\/wp\/v2\/posts\/1472\/revisions"}],"wp:attachment":[{"href":"https:\/\/daily.belltail.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1472"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/daily.belltail.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1472"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/daily.belltail.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1472"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}